Home >Backend Development >PHP Tutorial >php delete cookies and browser redirect_PHP tutorial

php delete cookies and browser redirect_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:47:42780browse

Copy code The code is as follows:

if(isset($_COOKIE["username"]))
{
header("location:main.php");
}
else
{
echo "cookie not found";
}
?>

Copy code The code is as follows:

setcookie("username") ; //Delete cookies
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319888.htmlTechArticleCopy the code as follows: ?php if(isset($_COOKIE["username"])) { header(" location:main.php"); } else { echo "cookie not found"; } ? Copy the code as follows: ?php setcookie("us...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn