Consider this code, in page1.php:
setcookie("someWord","I am a cookie");
...and this code, in page2.php:
print ("someWord says: $someWord");
$someWord = "I am a variable";
print ("< a href=\"page2.php?someWord=$someWord\" >Click here< /a >");
(In the actual code, the value of $someWord is passed via POST through a
form, but the principle is the same.)
The first time I load page2.php, the output should be:
someWord says: I am a cookie
Which, of course, works perfectly.
But each subsequent time I load page2.php, I want the output to be:
someWord says: I am a variable
and then set the value of the cookie "someWord" to "I am a variable".
But that's not what happens. Everytime I load page2.php, someWord tells me
that it is a cookie.
How do I get the value of the variable to override the value of the cookie?
Richard S. Crawford
AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford
MSN: [EMAIL PROTECTED]
"It is only with the heart that we see rightly; what is essential is
invisible to the eye." --Antoine de Saint Exupéry
"Push the button, Max!"
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]