SESSION variable giving undefined index error


#1

I am getting error “Notice: Undefined index: id in /storage/ssd3/464/3107464/public_html/main.php on line 4” when I login to my website. It is pointing to line $id=$_SESSION[‘id’]; even after session_start(); is at top of the page and SESSION[‘id’] is initialized while logging in. Is it related to file name as it is main.php ? I am new to php. Please help


#2

Hi @iamcrj!

Please screenshot the issue, as I have logged in to your site and I see no errors :confused: