dzhax Posted April 7, 2012 Share Posted April 7, 2012 I thought I would get creative with my title tonight. I am trying to set a cookie when a page loads and it will not set. <?php if(isset($_GET['directlink'])){ $expire=time()+60*60*10; //set expire 10 minutes from now setcookie("directLink", $_GET['directLink'], $expire); }?> Is there something im missing? I have been staring at this code for 30 mins now. if i echo $_Cookie['directLink']; it doesnt print anything to the screen its as if its not even being set. Some help will be much appriciated. Link to comment Share on other sites More sharing options...
dsonesuk Posted April 7, 2012 Share Posted April 7, 2012 LOOK harderif(isset($_GET['directlink']))setcookie("directLink", $_GET['directLink'], $expire); Link to comment Share on other sites More sharing options...
dzhax Posted April 12, 2012 Author Share Posted April 12, 2012 thanks for that. a second pair of eyes is needed sometimes. I hate case sesitive code... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.