-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.txt
53 lines (40 loc) · 1.6 KB
/
index.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
$host = "localhost";
$username = "root";
$password = "";
$dbname = "Hotel";
$con = mysqli_connect($host, $username, $password, $dbname);
if (!$con)
{
die("Connection failed!" . mysqli_connect_error());
}
if(isset($_POST['submit']))
{
// $id = $_POST['id'];
$email = $_POST['email'];
$full_name = $_POST['fullname'];
$address = $_POST['address'];
$adharcard = $_POST['adharcard'];
$city = $_POST['city'];
$state = $_POST['state'];
$zipcode = $_POST['zipcode'];
$number = $_POST['number'];
$sql = "INSERT INTO `account` (`email`, `fullname`, `address`, `adharcard`, `city`, `state`, `zipcode`,`number`) VALUES ('$email', '$full_name', '$address', '$adharcard', '$city', '$state', '$zipcode','$number');";
$rs = mysqli_query($con, $sql);
if($rs)
{
// echo "Message Send Successfully ";
header('location:/html/wait.html');
$receiver = $email;
$subject = "Room Booking From Shri Radhey Krishna Resort";
$body = " Hello , $full_name This Email Is Related to Your Hotel Booking From Shri Radhey Krishna Resort .\n This is The Address . We Are Waiting For You . \n \n \n https://www.google.com/maps/place/Vrindavan+Cottages+by+Sheosante/@27.5620482,77.6394061,18.08z/data=!4m8!3m7!1s0x39736d64678befe1:0xde577378b5ad921b!5m2!4m1!1i2!8m2!3d27.5621752!4d77.6393938" . " \n \n \n If You Face Any Problem Related To Our Location You Are Free to Call Us At : +919520166046 \n \n Thanks" ;
$sender = "From: [email protected]";
if(mail($receiver, $subject, $body, $sender)){ //php function send mail
// Image function
}else{
header('<location:/index.html');
}
}
mysqli_close($con);
}
?>