Jump to content

Tryin to set this here cookie


kiowa_jackson

Recommended Posts

I want someone who is coming in with the link

 

www.mydomain.com/index.php?msg=1

 

to get a cookie set called msg with the value 1.

 

I tried using this:

 

<?php 

$days = 360; 
$time = time() + ($days * 86400);

setcookie('msg', $msg, $time);

?>

 

but to no avail. Can someone tell me what I need to change to make it work?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/92308-tryin-to-set-this-here-cookie/
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.