Okay, so I’ve got a php script something like the following:
<?php
$name = "Steve Jobs";
header('Location: http://www.apple.com/custom.php&name=' . $name);
?>
Now, I happen to find it kind of embarrasing having the URL of this custom “Hi there, Steve Jobs” page have a URL of http://www.apple.com/custom.php&name=Steve%20Jobs, and would therefore like to encode it.
Is there an easy way to make this name be more obscure? Is there a way to avoid passing it in the URL altogether?
To avoid passing variables around in the URL you could use session variables using the
$_SESSIONarray.You can check out the PHP docs for some basic usage, as well as other examples.