Hi all!
I have transferred a website from one server to another. The site was orignially written in php by someone else, so I am trying to make sense of it as much as I can.
Everything works perfectly on the new server, except Cookies - and it's driving me crazy!
Is there any reason why cookies wouldn't work on a different server? I have checked with my isp - and they say other people are running cookies on teh server just fine.
Any ideas?
I'll include some code - although it's EXACTLY the same code as was running on the other server and working fine!
<snipet>
/ IF WE HAVE HIT STAGE2, NEED TO VALIDATE THE USERNAME NOW
if ($action == "stage2") {
$result = mysql_query ("SELECT * FROM users WHERE username='$username'");
if ($i = mysql_fetch_array ($result)) {
if ($i["password"] == crypt ($password, $i["password"])){ // SUCCESSFUL
setcookie ("username", $username, time()+720, "/");
}
else // FAILED
setcookie ("username", "", time());
}
else // FAILED
setcookie ("username", "", time());
}
// OTHERWISE, BLANK IT
else
setcookie ("username", "", time());
Thanks in advance!!!