Jump to content

Cookie Problems


lill87

Recommended Posts

Im trying to make a cookie activate in a function:

 

function cookieSet()

{

setcookie("RegCookie", $value, time()+3600*12);

}

 

and then activate the function when $error != 1

 

but i get this error:

 

"Warning: Cannot modify header information - headers already sent by (output started at D:\xampplite\htdocs\register.php:38) in D:\xampplite\htdocs\register.php on line 29"

 

Please tell me how to fix this or another way to make a cookie set when  $error != 1

 

Thanks in advance!

 

 

Link to comment
https://forums.phpfreaks.com/topic/51090-cookie-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.