Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($result->num_rows > 0) {
- // output data of each row
- // using loop we are getting following information
- $user_id="";
- $email="";
- $username="";
- while($row = $result->fetch_assoc()) {
- $user_id=$row["user_id"];
- $email=$row["email"];
- $username=$row["username"];
- }
- $_SESSION['user_id'] = $user_id;
- $_SESSION['email'] = $email;
- $_SESSION['username'] = $username;
- $_SESSION['flag'] = true;
- header("location: home.php");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement