Server : LiteSpeed System : Linux us-phx-web1202.main-hosting.eu 4.18.0-553.84.1.lve.el8.x86_64 #1 SMP Tue Nov 25 18:33:03 UTC 2025 x86_64 User : u615232177 ( 615232177) PHP Version : 8.1.33 Disable Function : NONE Directory : /home/u615232177/domains/bond-lounge.com/public_html/ |
<?php use PHPMailer\PHPMailer\PHPMailer;use PHPMailer\PHPMailer\Exception;use PHPMailer\PHPMailer\SMTP; session_start();
$page_name = basename($_SERVER['PHP_SELF']);
$page_title = "Login";
$page_header = "account_header.jpg";
include("header.php"); ?>
<title><?php echo $company_name; ?> - <?php echo $page_title; ?></title>
<?php include("page_header.php"); ?>
<?php $errors=0;
if (isset($_POST["log_in"])) {
$email = mysqli_real_escape_string($con,$_POST['email']);
$password = mysqli_real_escape_string($con,$_POST['password']);
$sql = "SELECT * FROM users WHERE email = '$email' AND password='$password' LIMIT 1" ;
$check_query = mysqli_query($con,$sql);
$count_email = mysqli_num_rows($check_query);
if($count_email > 0){
while ($row_first_name = mysqli_fetch_array($check_query, MYSQLI_ASSOC)) {
$first_name = $row_first_name['first_name'];
$last_name = $row_first_name['last_name'];
$phone = $row_first_name['phone'];
$user_id = $row_first_name['user_id'];
$email = $row_first_name['email'];
}
}
if($count_email !== 1){
//create a session to verify it's coming from here
$_SESSION["action"] = "true";
$message="Wrong username or password";
echo "<meta http-equiv=\"refresh\" content=\"0; url=failure?u=$page_name&m=$message\">";exit();
$errors = 1;
}
if($errors ==0 AND isset($_POST['log_in'])){
//create the sesssion
$_SESSION["email"] = $email;
$_SESSION["user_id"] = $user_id;
$_SESSION["first_name"] = $first_name;
$_SESSION["last_name"] = $last_name;
$_SESSION["phone"] = $phone;
//take them to the success page
echo "<meta http-equiv=\"refresh\" content=\"0; url=account\">";
exit();
}
}
?>
<!--Sign In Start -->
<section class="sign-in">
<div class="container">
<div class="row justify-content-center">
<div class="col-xl-6 col-lg-6">
<div class="sign-in__single">
<h3 class="sign-in__title">Welcome Back</h3>
<form class="sign-in__form" action="sign_in" method="post">
<div class="sign-in__form-input-box">
<input type="email" placeholder="Email address" name='email' required >
</div>
<div class="sign-in__form-input-box">
<input type="password" placeholder="Password" name='password' required >
</div>
<div class="sign-in__form-btn-box">
<button type="submit" name='log_in' class="thm-btn sign-in__form-btn">Login</button>
<div class="sign-in__form-forgot-password">
<a href="sign_up">Don't have an account? Sign up</a> <br>
<a href="forgotpassword">Forgot Password?</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!--Sign In End-->
<?php include("footer.php"); ?>