I am writing a login script that, once the user is authenticated, I set three cookies and then pass them over to another section:
if($password == $result[password] && $email == $result[email]){
$currtime = time() + 1800;
setcookie("thisuser", $result[email], $currtime, $cookiepath);
setcookie("thispw", $result[password], $currtime, $cookiepath);
setcookie("thisid", $result[id], $currtime, $cookiepath);
?>
<script> location.href="associate.php?action=welcome";</script>
<?
}
I know that the cookies are being accepted by the browser and they are the correct the info (set Netscape to warn before accepting any cookies)...however I can not retrieve the info in the cookies once they are set. I try to do something along the lines of:
mysql_query("SELECT * FROM associates WHERE id=$thisid");
I thought that once you create a cookie then it becomes a var...what am I doing wrong?
Thanks,
Kyle