File manager - Edit - /home/custbahd/public_html/tests/email-verify/login.php
Back
<?php include('conn.php'); session_start(); if ($_SERVER["REQUEST_METHOD"] == "POST") { function check_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } $email=check_input($_POST['email']); $password=md5(check_input($_POST['password'])); if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $_SESSION['log_msg'] = "Invalid email format"; header('location:index.php'); } else{ $query=mysqli_query($conn,"select * from user where email='$email' and password='$password'"); if(mysqli_num_rows($query)==0){ $_SESSION['log_msg'] = "User not found"; header('location:index.php'); } else{ $row=mysqli_fetch_array($query); if($row['verify']==0){ $_SESSION['log_msg'] = "User not verified. Please activate account"; header('location:index.php'); } else{ $_SESSION['id']=$row['userid']; header('location:index.php'); } } } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 1.66 |
proxy
|
phpinfo
|
Settings