PHP cookies…?
I’m supposed to create a form and if the user presses submit, a cookie should be set (on a \”Your message has been sent\” confirmation page). Now, if you go back to the first page to send an email again, it should give a message in the form \”You sent an email entitled subject at date/time. You may not send more than one email in any 24 hour period.\”
But I can’t get the cookie to print on the conf.php page…line 24… http://rafb.net/p/imy2oj45.html , and I cant get anything to print on the email.php…lines 4-8 http://rafb.net/p/erHLsp90.html . What am I doing wrong?
no 1 rule for cookies in PHP.
1. You should leave the page where you set your \”cookie\”, for the cookie to be set.
– explanation: If for example in page1.php you use
setcookie(\”message\”,\”sent\”,time( ) + 60*60*24);
//Your next line would be
header(\”Location: messagesent.php\”);
// header is use to redirect to another page. don\’t use include or include_once.
hope this helps.
DEAR KO – EPISODE #2: ADVICE ON – LOVE, LIFE, RELATIONSHIPS, IMPORTANT DECISIONS
[affmage source=\"amazon\" results=\"3\"]email subject lines dating[/affmage]
[affmage source=\"cj\" results=\"5\"]email subject lines dating[/affmage]
[affmage source=\"clickbank\" results=\"3\"]email subject lines dating[/affmage]
Related posts: