PHP and Cookies, mysterious problem...

michaelsanford

Translator, Web Developer
This cookie is never set in my browser (I checked the cookies panel in Omniweb). This is the complete cookietest.html file:

Code:
<?php setcookie("cookiename", "cookievalue", time() + 100); ?>

<html>
<?php
	print $cookiename;
?>
</html>

Ideas? I've also got a really big complicated PHP cookie problem with a recursive script that verifies a form, if anyone's brave enough to give me a hand (PM me I'll give you more info, don't want to post the code publically).
 
I really have no idea what I'm talking about, but I've come across times when adding something would cause problems if it wasn't in parenthesis.

<?php setcookie("cookiename", "cookievalue", (time() + 100)); ?>

Again, however, I don't know a thing about PHP, and even less about cookies. If that helps you, it was pure luck.

- Brian
 
Back
Top