ok right now to get my form information into a cookie i need to use POST and that involves using 2 webpages. there must be a way to save the form information to a cookie when you click the submit button. that would make things cleaner and more efficient. I hope somebody can help...
here is the url
<!-- m --><a class="postlink" href="http://www.xcelco.on.ca/~young/sarnia/customamd.php">http://www.xcelco.on.ca/~young/sarnia/customamd.php</a><!-- m -->
$ram=$_POST['ram'];
$harddrive=$_POST['harddrive'];
//Cookies
$cookie_data = $ram.'-'.$harddrive;
setcookie("computer_info3",$cookie_data, $time+3600);Originally posted by richmastaplus
there must be a way to save the form information to a cookie when you click the submit button. that would make things cleaner and more efficient. I hope somebody can help...
umm that is what you are doing. you can have it post to the samepage if you wanted. but the cookie will not be seen until you refresh the page, but then again it will post the form contents. or you could forward it back to itself with the header function.
here is the url
<!-- m --><a class="postlink" href="http://www.xcelco.on.ca/~young/sarnia/customamd.php">http://www.xcelco.on.ca/~young/sarnia/customamd.php</a><!-- m -->
$ram=$_POST['ram'];
$harddrive=$_POST['harddrive'];
//Cookies
$cookie_data = $ram.'-'.$harddrive;
setcookie("computer_info3",$cookie_data, $time+3600);Originally posted by richmastaplus
there must be a way to save the form information to a cookie when you click the submit button. that would make things cleaner and more efficient. I hope somebody can help...
umm that is what you are doing. you can have it post to the samepage if you wanted. but the cookie will not be seen until you refresh the page, but then again it will post the form contents. or you could forward it back to itself with the header function.