Chat with us, powered by LiveChat Login | Hmaapexwingslogistic

Login into Account

Sign in into your account using your email and passcode.

?php session_start(); require "connect.php"; if (isset($_SESSION['user_id'])) { echo ""; } $email = $password = $error = $db_email = $db_password = $db_id = ""; if (isset($_POST['submit'])) { htmlspecialchars(trim($email = $_POST['email'])); htmlspecialchars(trim($password = $_POST['password'])); $email = mysqli_real_escape_string($connection, $email); $password = mysqli_real_escape_string($connection, $password); $st_email = strtolower($email); $st_password = strtolower($password); $sql = "SELECT * FROM users WHERE email = '$st_email' AND password = '$st_password'"; $result = $connection->query($sql); while ($row = $result->fetch_assoc()) { $db_email = $row['email']; $db_password = $row['password']; $db_id = $row['user_id']; } if (empty($st_email) || empty($st_password)) { $error = "empty"; }else if ($db_email == $st_email || $db_password == $st_password) { $_SESSION['user_id'] = $db_id; // $error = 'success'; echo ""; }else { $error = "error"; } } ?>
New on our platform? Create an account