This is the piece of the sourcecode on the login page where the cookie is needed.
This works on every free webserver I ever tried, but it doesn't work on my own webserver...
$strSQL = "SELECT * FROM tbl_user WHERE loginName='$user'";
$rsUser = mysql_query($strSQL, $cnn);
if(mysql_num_rows($rsUser) >= 1)
{
$rowUser = mysql_fetch_array($rsUser);
if($pass == $rowUser["Pass"])
{
if($rowUser["Val"] == 0){
$err = "Account needs to be activated";
}
else{
setcookie("Login", $rowUser["ID"], time()+7200, "/~rasmus/", ".utoronto.ca", 1)
;
if(!isset($_COOKIE["Login"])){
$err .= "<br />Cookie not created";
}
}
}
else
{
$err = "Wrong password";
}
}
else
{
$err = "No such user";
}