PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
now i'm having more problems with those pesky cookies.... anyway i'm creating a logout page which should be easy but my incompetence amazes me ... anyway i duno whats wrong with this it wont update the online file to n like i want and it wont delete the cookies
if (isset($idcbaa)){
$dbh = mysql_connect ("localhost", "dragonsb_xmb1", "password") or die ('I cannot connect to the database.');
mysql_select_db ("dragonsb_xmb1");
mysql_query("UPDATE users SET online='n' WHERE id='$idcbaa'");
}
setcookie ("idcbaa","",time()-3600,"/","cbaa.vze.com");
setcookie ("logcbaa","",time()-3600,"/","cbaa.vze.com");
You MUST delete a cookie with all of the same parameters as it was created, so if you include domains etc when the cookie was created they must also appear when you want to delete the cookie.