-1

for my form

window.location="xxx.php?id="+id;

The value of id is displayed in URL like this

localhost/filename.php?id=2.

i didnt want to show the URL value id=2.

how to convert the value like `localhost/filename.php?id=XZsaswee.. like this. Please Help me.

Dhaval Marthak
  • 17,246
  • 6
  • 46
  • 68
user2637639
  • 47
  • 1
  • 3
  • 9

2 Answers2

0

You can do some stuf like making some operations on the id before sendin it, but these operations should be reversable (multiply, devide ...) to do the same thing on the server side to know what's the real number wich is sent by the View. Hope it Helps

Hamdi Baligh
  • 874
  • 1
  • 11
  • 30
0

put your value in base64_encode function.it encode the your value.
use this for encoding:
suppose

$id="2";
base64_encode($id);

now ,

localhost/filename.php?id=$id.

and decode it using

base64_decode($id);
DS9
  • 2,995
  • 4
  • 52
  • 102