what do I set the cookie value and name to be for a value a user may enter in a form? and what do i use to display that value on my second page? (I can't not use cookies for this, so while there may be a smarter way to do this, I would just like to know how to do it with cookies!!) Thanks!
<?php
setcookie($color, 'color');
setcookie($name, 'name');
?>
<?php
echo "<form action=\"form_data.php\" method=\"post\">";
echo "favorite color:<input type=\"text\" name=\"color\" size=\"20\"><br/>";
echo "name:<input type=\"text\" name=\"name\" size=\"20\"><br/>";
echo "<input type=\"submit\" value=\"Submit\" />";
echo "<br /><input type=\"hidden\" name=\"submitted\" value=\"true\" />";
?>
data on form_data:
<?php
echo "<b>fav color:</b>".$_COOKIE['color'];
echo "<b>name:</b>".$_COOKIE['name'];
?>