Jump to content

set cookie


robert_gsfame

Recommended Posts

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

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/170415-set-cookie/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.