Jump to content

What's wrong with my if S_SESSION statement


Zephyris

Recommended Posts

It's been awhile since I coded php so I'm trying to check what I'm doing wrong...

 


session_start(); 
$_SESSION['utilisateur']="Invite";

if($_SESSION['utilisateur'] == "Invite") { 
	$dlogin = file_get_contents('display_login.html');
} else {
	$dlogin = file_get_contents('display_usermenu.php');
}
echo($dlogin);

 

Notice: Undefined variable: _SESSION in C:\Program Files (x86)\EasyPHP-5.3.4.0\www\index.php on line 21

 

line 21 being if($_SESSION ...

 

hmmm, im confused i dont see any syntax errors, do you?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.