http://php.flashwebhost.com/stefin/login.php
Password Matched.
PHP Code:
<?php
require 'includes/database.php';
$email = $_POST['email'];
$password = $_POST['password'];
$email = trim($email);
$password = trim($password);
$sql = "select * from users where email='$email'";
$result = $mysqli->query($sql);
if ($result->num_rows == 0) {
die("No user with email address $email found");
}
$userInfo = mysqli_fetch_assoc($result);
if ($userInfo['password'] == $password) {
echo "Password Matched";
} else {
die("Invalid password");
}





Reply With Quote
Bookmarks