Well, as long as you've set a value for $cookiename it should work, what may be tripping you up is that PHP won't have access to that cookie until the next time you script loads. There's nothing wrong with your code, however.
If that's not the case then you will need to provide us with further information. Most of the regulars on this list are pretty good at solving problems. Unfortunately 'it doesn't work' isn't quite enough information for us to go on. > -----Original Message----- > From: Karl S. Løland [mailto:[EMAIL PROTECTED]] > Sent: December 4, 2001 21:43 > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Cookie > > could someone help me? > > i want to set a cookie but it don't work. what is wrong with this code? > > setCookie($Cookiename, "1", time()+86400); > > and could someone help me with it and tell me how i set a cookie? (if this > code is totaly wrong) > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]