Please view my php testing page to see what I am trying to accomplish.
I would like to make the form conditional so that if the cookie is already set, the form does not show up, but if the cookie is not set, it provides the form so the info can be entered into a cookie. Any ideas on how to do this?
This form provides the info for the cookie:
<form action="../users_name.php" method "get">
<input name="getname" type="text" value="yourname" size="12">
<input type="submit" name="submit" value="tell us!" />
</form>
This code receives the info and creates a cookie with that info:
<?php
setcookie('his_name', $_GET['getname'], time() + (60 * 60 * 24));
?>
This code prints the value of the cookie:
<?php
$getname = $_COOKIE['his_name'];
print("Hey, $getname");
?>
Thanks very much for helping out a newbie!
Zak