O
Cookie+カスタム関数!!!
で簡単なウェルカム効果を実現:
x x
<form name = "msg" method = "POST" action = ""> 请输入id:<input name = "con" type = "text"></input><br /> <input name = "submit" type = "submit"></input> </form><?php function welcome($c1){ if(! isset($_COOKIE['con'])){ setcookie('con', 0 ,time()+3600); echo "WELCOME!"; }else{ $con = $_COOKIE['con'] + 1; setcookie('con', $con,time()+3600); echo $c1,"桑,这是您第",$con, "次光临哟"; } } welcome($_POST['con']); function decoo($p2){setcookie('con', '', time()-1);}?>