Hey, I recently created a basic login script for a new site I'm working on that uses cookies. My problem is that on everyone who tested it, who has a newer computer, with a newer version of XP has the cookie rejected. heres the main part
// if they chose to be rembered:
if($remem == "yes") {
//sets the cookie for 1 year:
if(setcookie("cookiename", $uname, time()+3600*24*7*52)) {
$yesorno = "Login complete";
else {
$yesorno = "Login Failed";
}
// if they chose a regular login:
} else {
// sets the cookie for 6 hours:
if(setcookie("cookiename", $uname, time()+3600*6)) {
$yesorno = "Login complete";
} else {
$yesorno = "Login Failed";
}
}
with the people that have the newer computers, echo $yesorno; is displaying "Login Complete", but its not actually setting the cookie. (Note: if i add or subtract ANY attributes from setcookie(), it flatout doesnt work period, for anyone)
Will it be possible to get it to work for pretty much everyone? would I get a different result if I used sessions? if so, what would i substitute the above code with to use sessions, and how would I call them?