HELP!!! Keep getting problem with undefined index....

I really dont get it now i keep having this problem and there always seems to be a different solutiion. Im defining variables and yet its telling me that they arent defined; so confusing :s

[PHP]<?php

$username = $_SESSION[‘user’];
$userid = $_SESSION[‘id’] ;

if ($username)
{
echo “You are logged in as $username”;
}

else
{
echo "

Register
"; }

?>[/PHP]

I know coding can be frustrating at times but im seeing myself not having any hair left the way this is going lol

Sponsor our Newsletter | Privacy Policy | Terms of Service