esthera
03-22-2007, 08:21 PM
I have the following code for setting cookies
<?php
setcookie("username", "me", time()+3600);
setcookie("password", "test", time()+3600);
echo "set cookies:";
?>
and for reading cookies:
<?php
echo "cookies:";
echo "<br>username:".$_cookie["username"];
echo "<br>password:".$_cookie["password"];
?>
but when I read the cookies they are showing as blank after I set them
what am I doing wrong?
<?php
setcookie("username", "me", time()+3600);
setcookie("password", "test", time()+3600);
echo "set cookies:";
?>
and for reading cookies:
<?php
echo "cookies:";
echo "<br>username:".$_cookie["username"];
echo "<br>password:".$_cookie["password"];
?>
but when I read the cookies they are showing as blank after I set them
what am I doing wrong?