How can I automatically add cookies to the form? Every time I log on to a website with a cookie, I will automatically enter the cookie into the form and stop it on the login page. how can I directly jump to the Cookie and automatically enter the cookie into the form?
When there is a cookie upon login, the cookie will be automatically entered into the form and will be parked on the login page. how can this problem be solved? I can only jump directly to the Cookie login page to share it:
------ Solution --------------------
if(empty($_COOKIE["username"]))
{
$_COOKIE["username"]="kobe_chen" ;
}
if($_SERVER["REQUEST_METHOD"]=="GET")
{?>
}?>
------ Solution --------------------
This function is also easy to implement using php.
We now set a check box on the logon page. if this box is selected, the user name is saved.
First, we write this on the front-end page.
Background program loginProcess. php
If (! Empty ($ keep )){
Setcookie ('id', $ id, time () + 3600*24*30 );
} Else {
If (! Empty ($ _ COOKIE ['id']) {
Setcookie ('id', $ id, time ()-100 );
}
}
You can. For details, refer to the php video tutorial 114th on cookie. This usage is described.