大家看看,我是哪里出了错,是不是要对php.ini的某个地方进行设置。
<?php
if($action=="setcookie"){
setcookie("visitorname",time()+90*86400);
}
if(isset($visitorname)): ?>
welcome<b><?php echo $visitorname; ?> </b>!
<?php else: ?>
<form>
<input type="hidden" name="action" value="setcookie">
welcome,Please tell us your name:<input type="text" name="visitorname"> <br>
<input type="submit" value=" ok ">
</form>
<?php endif; ?>
出现如下的错误:
Notice: Undefined index: action in c:\inetpub\wwwroot\setcookie.php on line 2
是不是php.ini中需要设置,我该如何做