note 120400 rejected from reserved.variables.session by kalle

From: Date: Wed, 30 Dec 2020 17:30:28 +0000
Subject: note 120400 rejected from reserved.variables.session by kalle
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-216046@lists.php.net to get a copy of this message
Note Submitter: Nitin Sharma ---- This is the code for session.php but it is not working properly. I have three field in my database log_id,user_email,user_pass. and when I want to login into my website it does not works. I've some issues with session creation. if you could help me please go ahed. <?php $dbhost = "localhost"; $dbname = "new"; $dbuser = "root"; $dbpass = ""; $conn = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass); session_start(); $user_check=$_SESSION['login_user']; $result = $conn->prepare("SELECT * FROM login WHERE user_email = :user_check"); $result->execute(array(":usercheck"=>$user_check)); $row = $result->fetch(PDO::FETCH_ASSOC); $login_session =$row['user_email']; $user_id =$row['log_id']; $user_passwords = $row['user_pass']; if(!isset($login_session)) { $conn = null; header('Location: www.fb.com'); } ?>

« previous php.notes (#216046) next »