robert_gsfame Posted August 15, 2009 Share Posted August 15, 2009 i want to get all username and password shown inside textbox by using cookies can anyone help me? set cookies once checkbox checked and login button was pressed and found correct setcookie("cookname", $_POST['username']); setcookie("cookpassword", $_POST['password']); then i tried with this: $username = $_POST['username']; $password = $_POST['password']; if(isset($_COOKIE['cookname']) && isset($_COOKIE['cookpassword'])){ $username==$_COOKIE['cookname']; $password==$_COOKIE['cookpassword']; } help me with the correct code please thanks Quote Link to comment https://forums.phpfreaks.com/topic/170415-set-cookie/ Share on other sites More sharing options...
wildteen88 Posted August 15, 2009 Share Posted August 15, 2009 == should be = However it is not recommended to save sensitive information such as passwords within cookies. Quote Link to comment https://forums.phpfreaks.com/topic/170415-set-cookie/#findComment-899005 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.