cookies
| From: | Fernando Fiore | Date: | Mon, 10 Aug 2020 09:44:58 +0000 |
| Subject: | cookies | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-327259@lists.php.net to get a copy of this message | ||
//i want to display the value of the field txt in my form
<?php
if(isset($_COOKIE)){
print($_COOKIE['name']);
}
setcookie("name","myform[txt]",time() + 24 * 60 * 60);
?>
<form action="cookie.php" name="myform" method="post">
<input type="text" name="txt" id="txt" />
<input type="submit" formmethod="post" />
</form>