Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global $dblocalhost;
- $button = filter_input(INPUT_POST,'click');
- if(isset($button)){
- $mail = filter_input(INPUT_POST,'email');
- $pass = filter_input(INPUT_POST,'pass');
- $email = mysql_real_escape_string($dblocalhost,$mail);
- $password = mysql_real_escape_string($dblocalhost,$pass);
- $queri = "SELECT * FROM user-data WHERE email ='$email'" or die("error query");
- if(!$queri){
- die('nope'.mysqli_error($queri));
- }
- $output = mysqli_query($dblocalhost,$queri);
- while($check = mysqli_fetch_array($output)){
- $user = $check['email'];
- $userpass = $check['password'];
- }
- if ($email == $user && $password == $userpass){
- $_SESSION['email'] = $user;
- $_SESSION['password']= $userpass;
- header("Location: dashbo.php");
- exit();
- } else{
- header('Location: login.php?error');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement