Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I get the following output for set_cookie.php below.Code: Select all
tt
weee
Warning: Cannot modify header information - headers already sent by (output started at /content/StartupHostPlus/o/l/olol.org.uk/web/set_cookie.php:7) in /content/StartupHostPlus/o/l/olol.org.uk/web/set_cookie.php on line 14
Warning: Cannot modify header information - headers already sent by (output started at /content/StartupHostPlus/o/l/olol.org.uk/web/set_cookie.php:7) in /content/StartupHostPlus/o/l/olol.org.uk/web/set_cookie.php on line 16
SEE COOKIE
Usernames:
UsernamesCode: Select all
jto
<br>
tt
<br>
<br>
<?php
echo "weee<br><br>";
$value = 'something from somewhere';
$values = 'something from somewhere';
setcookie('usernames',$value,time()+120);
setcookie("TestCookie", $value, time()+3600);
?>
<br>
<a href="get_cookie.php">SEE COOKIE</A>
<br>
Usernames:<b><?php $_COOKIE['usernames'] ?></b>
<br>
Usernames:<b><?php $_COOKIE['TestCookie'] ?></b>
<br>Code: Select all
jto
tt
weee
finished the cookie
Usernames:Code: Select all
jto
<br>
tt
<br>
<br>
<?php
echo "weee<br><br>";
if($_COOKIE['usernames']=="")
{
echo "finished the cookie<br><br>";
}
?>
<br>
Usernames:<b><?php $_COOKIE['usernames'] ?></b>I am puzzled.