I intend to use GET for my form but would like to encrypt the values in the query string so that users are not able to change it. (not for security, but for data hiding purposes)
I came across a couple of websites which explained encryption, but it is not clear to me how to implement it once the user presses the submit button. Ex: http://myscriptlibrary.wordpress.com/2010/04/14/how-to-encrypt-query-string-in-php/
Is there an example which could show this?
Thanks.
From my understanding of the link that you provided. You want to encrypt the GET variables, or at least obfuscate them.
The best and easiest way that this could be done is using
base64_decode/encodeFor example to encode the string you would do something like:
$linkwould look something likehttp://www.example.com/?item=rklgEwkelnf%3D%3D, but to translate the seemingly garbled (base64ed) text into something usable you would use:Then you can freely use the
$_GETvariable as you normally would.