| Server IP : 127.0.0.1 / Your IP : 216.73.216.48 Web Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 System : Windows NT DESKTOP-3H4FHQJ 10.0 build 19045 (Windows 10) AMD64 User : win 10 ( 0) PHP Version : 8.2.12 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/khalafsite-backup/old/htdocs/khalafsons.com/ |
Upload File : |
<?php
session_start();
include("db_con.php");
//include("function.php");
?>
<html>
<head>
<title>Khalaf sons</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="kvt_con/khalaf_log.jpg" type="image/ico">
<link rel="stylesheet" type="text/css" href="main_css/log_in.css" >
</head>
<body id="body">
<div class="main_home">
<div class="main_log">
<img src="kvt_con/khalaf_log.jpg" width="100%" height="100%" style="border-radius:30px;" classk="main_home_icon" />
</div>
<div class="main_text_title">Khalaf sons estate</div>
<a href="index.php"><button class="main_home_btn" onmouseover="close_more_home_btn_area();">Home</button></a>
<form method="post" >
<input type="text" name="log_in_input_email" class="log_in_input_email" placeholder="Email..." />
<input type="password" name="log_in_input_pass" class="log_in_input_pass" placeholder="Password" />
<button name="lon_in" class="log_in_btn">Log in</button>
</form>
<?php
if(isset($_POST['lon_in']))
{
$password_l = $_POST['log_in_input_pass'];
$email_l = $_POST['log_in_input_email'];
$log_in_user ="select * from khalaf_usertb where email='$email_l' AND password='$password_l'";
$run_log_in_user = mysqli_query($con,$log_in_user);
$check_log_in_user = mysqli_num_rows($run_log_in_user);
if($check_log_in_user <1){ echo"<div class='login_output' >Your Password Or Email Is Incorrect</div>";
}else{
$row_log_in_user = mysqli_fetch_array($run_log_in_user);
$user_id = $row_log_in_user['id'];
$user_email = $row_log_in_user['email'];
$_SESSION['id']=$user_id;
$_SESSION['email']=$user_email;
//echo"$user_id";
echo"<script>window.open('myaccount.php','_self')</script>";
}
}
?>
<button id="show_create_new_acc_btn" onClick="show_create_new_acc();" class="show_create_new_acc_btn">Create New Account</button>
<script>
function show_create_new_acc()
{
document.getElementById('content_area').style.display="block";
document.getElementById('show_create_new_acc_btn').style.display="none";
window.scrollTo(0,350);
}
</script>
</div>
<div id="content_area" class="content_area">
<form method="post" >
<div class="log_in_title">Create Member Account</div>
<input type="text" name="create_fname" class="name_input" placeholder="First Name" />
<input type="text" name="create_lname" class="name_input" placeholder="Last Name" />
<input type="text" name="create_contact" class="name_input" placeholder="Contact" />
<select typek="text" name="create_gender" class="name_input" >
<option selected >Select Gender</option>
<option>Male</option>
<option>Female</option>
</select>
<input type="text" name="create_emailt" class="name_input" placeholder="Email:example@kvt.com" />
<input type="password" name="create_pass" class="name_input" placeholder="Password" />
<input type="password" name="create_confirm_pass" class="name_input" placeholder="Confrim Password" />
<div style="float:left;width:80%;height:auto;margin-left:10%;margin-top:5px;backgroundk:red;color:#58ACD5;">By clicking Create, you agree to the Khalaf sons real estate User Agreement, Privacy Policy, and Cookie Policy.</div>
<button id="create_ac_btn" name="create_new_account" class="create_ac_btn" >Create</button>
</form>
<?php
if(isset($_POST['create_new_account']))
{
$fname = $_POST['create_fname'];
$lname = $_POST['create_lname'];
$contact = $_POST['create_contact'];
$gender = $_POST['create_gender'];
$email = $_POST['create_emailt'];
$pass = $_POST['create_pass'];
$confirm_pass = $_POST['create_confirm_pass'];
if($fname=="" || $lname=="" || $contact=="" || $gender=="Select Gender" || $email=="" || $pass=="" || $confirm_pass==""){
echo"<div style='float:left;width:100%;text-align:center;color:red;'>Fill All The Spaces</div>";
}else{
if($pass !== $confirm_pass){
echo"<div style='float:left;width:100%;text-align:center;color:red;'>Your Password Do Not Match</div>";
}else{
$get_user ="select * from khalaf_usertb where email='$email' AND password='$pass'";
$run_get_user = mysqli_query($con,$get_user);
$check_get_user = mysqli_num_rows($run_get_user);
if($check_get_user >0){
echo"<div style='float:left;width:100%;text-align:center;color:red;'>Your Password Is Too Weak,Account Not Created</div>";
}else{
$user_insert ="insert into khalaf_usertb (first_name,last_name,contact,gender,email,password,image_url,curr_date,curr_time) values('$fname','$lname','$contact','$gender','$email','$pass','avatar2.jpg', CURDATE() ,CURTIME() )";
$run_user_insert = mysqli_query($con,$user_insert);
if(!$run_user_insert){echo"<div style='float:left;width:100%;text-align:center;color:red;'>Your Account Has Not Been Created</div>";}
}
}
}
}
?>
</div>
<div style="float:left;width:100%;height:27px;background:black;color:white;margin-top:20px;text-align:center;font-size:1.2em;">@Khalaf Sons Real Estate 1990-2019.</div>
</body>
</html>