daveoffy Posted July 26, 2009 Share Posted July 26, 2009 The cookies wont save. In FF3 they did and in FF3.5 they are not. <?php require_once('../include/config.php'); $username = $_POST['username']; $password = $_POST['password']; $qry = "SELECT * FROM u_info WHERE username='$username' AND password='".md5($password)."'"; $result=mysql_query($qry); if($result) { if(mysql_num_rows($result) == 1) { if (isset($_POST['rememberme'])) { setcookie('username', $_POST['username'], time()+60*60*24*14, '/', 'www.site.com', NULL, TRUE); setcookie('password', md5($_POST['password']), time()+60*60*24*14, '/', 'www.site.com', NULL, TRUE); } else { setcookie('username', $_POST['username'], false, '/', 'www.site.com', NULL, TRUE); setcookie('password', md5($_POST['password']), false, '/', 'www.site.com', NULL, TRUE); } header("location: ../index.php"); exit(); }else { header("location: ../login-failed.php"); exit(); } }else { die("Query failed"); } ?> Link to comment https://forums.phpfreaks.com/topic/167445-solved-cookies-not-saving/ Share on other sites More sharing options...
Philip Posted July 26, 2009 Share Posted July 26, 2009 Is it solved or was that a mistake? Link to comment https://forums.phpfreaks.com/topic/167445-solved-cookies-not-saving/#findComment-882979 Share on other sites More sharing options...
.josh Posted July 26, 2009 Share Posted July 26, 2009 considering nobody seems to ever be able to find the topic solved button, I'd assume it was on purpose. Link to comment https://forums.phpfreaks.com/topic/167445-solved-cookies-not-saving/#findComment-882986 Share on other sites More sharing options...
daveoffy Posted July 26, 2009 Author Share Posted July 26, 2009 Ya, I made it save www. and without www. I was on a www.site.com so it wouldn't find the cookies or w/e Link to comment https://forums.phpfreaks.com/topic/167445-solved-cookies-not-saving/#findComment-883340 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.