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/sabrinaluxebraidedwigs.com/public_html/ |
<?php use PHPMailer\PHPMailer\PHPMailer;use PHPMailer\PHPMailer\Exception;use PHPMailer\PHPMailer\SMTP; session_start();
$page_name = basename($_SERVER['PHP_SELF']);
include("header.php"); ?>
<title><?php echo $company_name; ?> - Sign in</title>
<?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'];
$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.php?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;
//take them to the success page
echo "<meta http-equiv=\"refresh\" content=\"0; url=cart.php\">";
exit();
}
}
?>
<!-- Title Page -->
<section class="bg-title-page p-t-40 p-b-50 flex-col-c-m" style="background-image: url(images/banner-min.jpg);">
<h2 class="l-text2 t-center">
<div class='space_top'></div>
Sign in
</h2>
</section>
<!-- content page -->
<section class="bgwhite p-t-66 p-b-38">
<div class="container">
<div class="row">
<div class="col-md-3 p-b-30">
</div>
<div class="col-md-6 p-b-30">
<h3 class="m-text26 p-t-15 p-b-16 greenfont">
Sign in
</h3>
<h6>Dont have an account? <a href="sign_up.php">Register</a></h6>
<form class="leave-comment" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method='post' enctype="multipart/form-data">
<div class="bo4 of-hidden size15 m-b-20">
<input class="sizefull s-text7 p-l-22 p-r-22" type="email" name="email" placeholder="Email" required />
</div>
<div class="bo4 of-hidden size15 m-b-20">
<input class="sizefull s-text7 p-l-22 p-r-22" type="password" name="password" placeholder="Password" required />
</div>
<!--<div class="g-recaptcha" data-sitekey="6LflxXUUAAAAAIhqneppiHMi6bZwRskkG-NS-Bvl"></div>-->
<div class="w-size25">
<!-- Button -->
<button type='submit' name='log_in' class="flex-c-m size2 bg1 bo-rad-23 redbackground m-text3 trans-0-4">
Sign in
</button>
</div>
</form>
</div>
<div class="col-md-3 p-b-30">
</div>
</div>
</div>
</section>
<?php include("footer.php"); ?>