Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $email = mysqli_real_escape_string($con,$_POST['user']);
- $pass = mysqli_real_escape_string($con,$_POST['pass']);
- $sel_user = "select * from admins where email='$email' AND password='$pass'";
- $run_user = mysqli_query($con, $sel_user);
- $check_user = mysqli_num_rows($run_user);
- if($check_user>0)
- {
- $_SESSION['email']=$email
- echo "<script>window.open('index2.html','_self')</script>";
- }
- else {
- echo "<script>alert('Email or password is not correct, try again!')</script>";
- }
- <?php
- session_start();
- ?>
- <div class="inline-block">
- <h5 class="no-margin"> Welcome </h5>
- <h4 class="no-margin"> <?php echo $_SESSION['email']; ?> </h4>
- <a class="btn user-options sb_toggle">
- <i class="fa fa-cog"></i>
- </a>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement