why session variable is empty to navigate the next page?

前端 未结 1 1569
天命终不由人
天命终不由人 2021-01-29 05:49

I have been working is a website I have been dealing with a problem from a while, and now I know why it is happening, but not how to solve it. Please help!!

Page 1: In

1条回答
  •  不思量自难忘°
    2021-01-29 06:22

    use session in the start in first page, like this. Hopefully this will work

     ";
                   echo"alert('Oops.Username Or Password Incorrect!');window.location.href='login.php';";
                   echo"";
                }
               else
                {
    
            $_SESSION['id']=$row['id'];
            $_SESSION['message']=$user;
            $_SESSION['logout']="";
            $id=$_SESSION['id'];
            echo"";
            }
        }
    
    ?>
    

    0 讨论(0)
提交回复
热议问题