Some users are suing my site and managing no navigate fine, so I'm presuming the cookies set are ok, but some of the users have let me know that they keep on going back to the login screen. Anone know why this is.
Here's the code for the cookie.
<?
$db = mysql_connect("localhost", "website", "password");
mysql_select_db("database",$db);
$result = mysql_query("SELECT * FROM account WHERE username LIKE '$username' AND password LIKE '$password'",$db);
if ($myrow = mysql_fetch_array($result)) {
setcookie("username",$username,time()+3600);
setcookie("password",$password,time()+3600);
} else {}
?>