Using cookies

This page collects information for a cookie using a form, another page creates the cookie (a small text file used to store information on the computer) and a third page retrieves the cookie.

Enter cookie values

Enter your name:       
Enter a favorite food: 

If you already saved a cookie then you can view it here - you don't need to fill in the form.


There's nothing special about the code on this page except that the form posts to a page called createcookie.asp.

<form method="POST" action="writecookie.asp">
<pre>Enter your name: <input type="text" name="name" size="20">
Enter a favorite food: <input type="text" name="food" size="20">
<input type="submit" value="Submit" name="B1"></pre>
</form>