This article introduces the content of PHP using cookies to realize the Web page to remember the user name and password function, has a certain reference value, now share to everyone, the need for friends can refer to
1.html part
<!doctype html>2.php part
function Actionremember () { $this->name=$_cookie[' name ']; $this->password=$_cookie[' password ']; $this->remember=$_cookie[' remember ']; $this->display ("$this->subpath/remember.html");} function Actionremtest () { $remember =$_post[' remember '); $name =$_post[' name ']; $password =$_post[' password ']; if ($remember = = ' 3 ') { Setcookie ("name", $name, Time () +3600); Setcookie (' Password ', $password, Time () +3600); Setcookie (' Remember ', $remember, Time () +3600); } else{ Setcookie (' name ', ' ', Time () -3600); Setcookie (' Password ', ', Time () -3600); Setcookie (' Remember ', ', Time () -3600); } Exit;}