Problems using setcookie in PHP [renamed]

okay
now this is some weird stuff
pisses me off hehe

this works

<?php
setcookie("username");
?>

and this does not

<?php
setcookie("username", "asd");
?>

neither does this

<?php
$username = "admin";
setcookie ("username",$username,time()+3600);
echo($_COOKIE['username']);
?>

I told ya, it’s some crazy shiat
why is it like this?
please help me, I’m loosing my mind =)


<?php
$username = "admin";
setcookie ("username",$username,time()+3600,"/"); #added path "/"
#this will only work after refreshing ure page!! press F5
echo($_COOKIE['username']);
?>

man
you saved my evening :slight_smile:
I’ve been foolin around with this for 3 hours :confused:
:love: @ you