Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include("../config.php");
- error_reporting(E_ALL ^ E_NOTICE);
- if(isset($_POST['login']))
- {
- $user=mysqli_real_escape_string($con,$_POST['username']);
- $pass=mysqli_real_escape_string($con,$_POST['password']);
- $enc_pass=md5($pass);
- $get_detail=mysqli_query($con,"SELECT * FROM `users` WHERE email='$user' AND password='$enc_pass' ");
- $check=mysqli_num_rows($get_detail);
- if($check>0)
- {
- $_SESSION['email']=$user;
- echo"<script>window.open('dashboard.php','_SELF')</script>";
- }
- else
- {
- echo "Invalid Details";
- }
Add Comment
Please, Sign In to add comment