Answer the question
In order to leave comments, you need to log in
Why can't I set the php cookie?
Hello! On the server, there is such a hierarchy of cactologists:
site-|
|
|-newFolder-|
| |-cookie2.php
|-cookie1.php
<?php
setcookie("userid", "ralph", time()+3600);
print $_COOKIE["userid"];
?>
ralph
Answer the question
In order to leave comments, you need to log in
You need to specify a domain for cookies, read the setcookie documentation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question