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? Quote 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"); ?> Quote 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) Quote 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!!!!!! Quote Link to comment https://forums.phpfreaks.com/topic/115929-cookies-help/#findComment-596047 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.