I'm in the throes of learning PHP and am having some problems with cookies.
Specifically after sending cookies on submission of form data on one page using the following:
<?PHP
if ($BeenSubmitted) {
setcookie("FirstName","$FirstName",time()+"31536000","","","0");
setcookie("LastName","$LastName",time()+"31536000","","","0");
setcookie("SchoolName","$SchoolName",time()+"31536000","","","0");
setcookie("Address1","$Address1",time()+"31536000","","","0");
setcookie("Address2","$Address2",time()+"31536000","","","0");
setcookie("TownCity","$TownCity",time()+"31536000","","","0");
setcookie("Email","$Email",time()+"31536000","","","0");
setcookie("Telephone","$Telephone",time()+"31536000","","","0");
setcookie("County","$County",time()_+"31536000","","","0");
}
?>
How do I retrieve the same cookie values from subsequent pages in the same directory for printing on those pages.
I also need to be able to test for if cookies have been set in which case I would need to insert them in the appropriate places to autocomplete a form. Otherwise the empty form would be printed.
Any help appreciated.