$_SESSION variable not passing and no clue why? it sets then doesn't pass

前端 未结 4 921
无人共我
无人共我 2021-01-26 17:53

I have a login script coded in php and mysqli. upon submission and successful authentication it redirects to success.php to write sessions. my success page looks like this.

4条回答
  •  死守一世寂寞
    2021-01-26 18:21

    Use session_start(); inside all page before using $_SESSION variable in PHP. session_start(); function use to initialize session process.

    your success.php should be.

    
    
    ");
    
    }
    
    else {
        print "Session partner id not set";
    }
    
    ?>
    

提交回复
热议问题