mill Posted July 22, 2008 Share Posted July 22, 2008 I use to use this to set / call the cookies and it worked fine, but when i changed my server it stopped working <?php if ($username == NULL) { $username = $usercook; $password = $passcook; } setcookie("usercook", "$username"); setcookie("passcook", "$password"); ?> Now it stopped working any idea how to fix this? Link to comment https://forums.phpfreaks.com/topic/115929-cookies-help/ Share on other sites More sharing options...
MadTechie Posted July 22, 2008 Share Posted July 22, 2008 update to <?php if ($username == NULL) { $username = $_COOKIE['usercook']; $password = $_COOKIE['passcook']; } setcookie("usercook", "$username"); setcookie("passcook", "$password"); ?> Link to comment https://forums.phpfreaks.com/topic/115929-cookies-help/#findComment-596038 Share on other sites More sharing options...
MadTechie Posted July 22, 2008 Share Posted July 22, 2008 Oh yeah.. i should of said the reason for the problem is due to register globals have been turned off (thank god) Link to comment https://forums.phpfreaks.com/topic/115929-cookies-help/#findComment-596044 Share on other sites More sharing options...
ToonMariner Posted July 22, 2008 Share Posted July 22, 2008 You should NEVER store usernames / passwords in cookies - they can easily be spied upon!!!!!! Link to comment https://forums.phpfreaks.com/topic/115929-cookies-help/#findComment-596047 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.