Bee Posted June 5, 2006 Share Posted June 5, 2006 Hi,I took a tutorial to make a text file based counter. The counter counts fine; however, it doesn't seem to register the cookie because whenever I refresh the page, it adds one to the count. [img src=\"style_emoticons/[#EMO_DIR#]/excl.gif\" style=\"vertical-align:middle\" emoid=\":excl:\" border=\"0\" alt=\"excl.gif\" /] This is my cookie code:setcookie("user_ip", $REMOTE_ADDR, time()+360000);Any help will be very very much appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/11221-cookie-expires-too-early/ Share on other sites More sharing options...
Orio Posted June 5, 2006 Share Posted June 5, 2006 Can you show the counter script itself? I think the error is checking the cookie, not in setting it (because your setting is ok).Orio. Quote Link to comment https://forums.phpfreaks.com/topic/11221-cookie-expires-too-early/#findComment-42015 Share on other sites More sharing options...
Bee Posted June 5, 2006 Author Share Posted June 5, 2006 [!--quoteo(post=380198:date=Jun 5 2006, 08:53 AM:name=Orio)--][div class=\'quotetop\']QUOTE(Orio @ Jun 5 2006, 08:53 AM) [snapback]380198[/snapback][/div][div class=\'quotemain\'][!--quotec--]Can you show the counter script itself? I think the error is checking the cookie, not in setting it (because your setting is ok).Orio.[/quote] I could not send my code, I keep getting an error message when I try to send the code:"You are not authorized to view this page You might not have permission to view this directory or page using the credentials you supplied."But here is a link to the tutorial? My code is exactly the same except from the <br> statements that I removed.[a href=\"http://www.phpfreaks.com/tutorials/27/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/27/0.php[/a]Thank you,Bee Quote Link to comment https://forums.phpfreaks.com/topic/11221-cookie-expires-too-early/#findComment-42200 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.