I having this error Notice: Undefined index: uid_fb
please help
<?php 
include "common.php";
if($_SESSION['uid_fb']!='' && $_SESSION['login_fb']=='true')
{
// header("Location:home.php"); 
}
I having this error Notice: Undefined index: uid_fb
please help
<?php 
include "common.php";
if($_SESSION['uid_fb']!='' && $_SESSION['login_fb']=='true')
{
// header("Location:home.php"); 
}
 
    
     
    
    <?php 
   include "common.php";
   if (!empty($_SESSION['uid_fb']) &&
        isset($_SESSION['login_fb']) &&
        $_SESSION['login_fb']=='true')
   {
      // ...
   }
Use isset to determine if a variable has a value.  Use empty to determine if a variable is not set, or empty.
 
    
    Add isset:
<?php 
include "common.php";
if(isset($_SESSION['uid_fb']) && $_SESSION['uid_fb']!='' && $_SESSION['login_fb']=='true')
{
// header("Location:home.php"); 
}
