Jump to content

Help with SESSION variable


doforumda

Recommended Posts

Hi

 

I am using very simple code. Here it is

 

<?php
session_start();
$user = "guest";
$uid = "1";
echo $_SESSION['user']."<br />";
echo $_SESSION['uid'];
?>

it displays this error

Notice: Undefined index: user in C:\wamp\www\DealDash\index.php on line 5
Notice: Undefined index: uid in C:\wamp\www\DealDash\index.php on line 6

 

how can I solve this problem? Help please

Link to comment
https://forums.phpfreaks.com/topic/237058-help-with-session-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.