cookie problems
Posted: 14. October 2006 17:53
no matter what i try, i just can't seem to get cookies to work in xampp!
my code works fine on my 'real' server, but not on my machine here at home when running xampp.
does anyone know how i get the following line to work in xampp?:
should i be changing either '/' or 'localhost' to something else?
also, it seems that $HTTP_REFERER is not being sent, so my php cookie script cannot redirect the user automatically back to the referring page using this line:
any suggestions most welcome before i tear all my hair out!
cheers
simon
my code works fine on my 'real' server, but not on my machine here at home when running xampp.
does anyone know how i get the following line to work in xampp?:
- Code: Select all
setcookie("style", $theStyle, time()+36000, "/", "localhost");
should i be changing either '/' or 'localhost' to something else?
also, it seems that $HTTP_REFERER is not being sent, so my php cookie script cannot redirect the user automatically back to the referring page using this line:
- Code: Select all
header("Location: $HTTP_REFERER");
any suggestions most welcome before i tear all my hair out!
cheers
simon