0
I’m trying to generate a system that records a person’s email into a cookie so that they can add a list of a website’s properties to the database and when they upload the site via their email pulls up the list of favorite properties.
I made a simple form that plays to a page the post of his email. my Cod that gets this the following way.
if(!empty($_POST['Fmail'])){
setcookie( "meuemail", $_POST['Fmail'], strtotime( '+1 year' ) );
}
after that he updates the page
on the property page I have a simple script to validate this cookie
echo $_COOKIE['meuemail'];
Only it always goes blank and it never gets filled. Where am I going wrong?
Check that you have the "Fmail" index of the $_POST is correct. Replace this with a string ex to see if it works. In fact, this is how cookies are defined.
– foxtrot