一个简单的cookie求教
PHP code<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?php $name=$_GET["name"];$value=$_GET["value"];setcookie($name,$value);?><?php echo $_COOKIE["name"];?><?phpfor ($i=0;$i<10;$i++){?><a href="test.php?name=name&value=<?=%24i?>">=$i?></a><?php }?>
请教 如何在第一次点击的时候 就获取正确的cookie的值
这个程序要点两次才可以获得正确的 第一次点击 是记录上一次点击的值
求教求教
------解决方案--------------------$name=$_GET["name"];
$value=$_GET["value"];
setcookie($name,$value);
$_COOKIE[$name] = $value;
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