I used the solution accepted for this question for encrypting by id for example in /index.php?id=3 . The problem is I cannot send the encrypted value as an
Use PHP's urlencode() function to encode the value before you put it into a URL.
string
urlencode
( string
$str
)
This function is convenient when encoding a string to be used in a query part of a URL, as a convenient way to pass variables to the next page.
This function converts "weird" characters, such as =
, into a format safe to put into a URL. You can use it like this:
Header('Location: /index.php?id=' . urlencode($id))