Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Digital Lifestyle
Web Design and Hosting
Cookie php code not working!
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Groovetube" data-source="post: 1381762" data-attributes="member: 223633"><p>you need to out the setcookie call above output or any html tags, whitespace etc. much the same kind of issues can affect this call like the header calls. It's sent with the html headers.</p><p></p><p>Take that setcookie line and put it up above everything, no whitespace.</p><p></p><p>ie:[PHP]<?php setcookie("test", 45, time()+3600); ?></p><p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></p><p><html xmlns="http://www.w3.org/1999/xhtml"></p><p><head></p><p> <title>Cookie</title></p><p></head></p><p></p><p><body></p><p>This page has loaded correctly! But is thy cookie there!</p><p> <br /></p><p><a href="cookie_read.php">Check that cookie!</a></p><p></body></p><p></html>[/PHP]</p></blockquote><p></p>
[QUOTE="Groovetube, post: 1381762, member: 223633"] you need to out the setcookie call above output or any html tags, whitespace etc. much the same kind of issues can affect this call like the header calls. It's sent with the html headers. Take that setcookie line and put it up above everything, no whitespace. ie:[PHP]<?php setcookie("test", 45, time()+3600); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Cookie</title> </head> <body> This page has loaded correctly! But is thy cookie there! <br /> <a href="cookie_read.php">Check that cookie!</a> </body> </html>[/PHP] [/QUOTE]
Verification
Name this item. 🍎
Post reply
Forums
Digital Lifestyle
Web Design and Hosting
Cookie php code not working!
Top