-
Notifications
You must be signed in to change notification settings - Fork 0
/
ContactusSubmission.php
135 lines (105 loc) · 4.33 KB
/
ContactusSubmission.php
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
$alert= false;
$message='';
if(!empty($_POST["send"])){
$name = $_POST["Name"];
$email = $_POST["Email"];
$subject = $_POST["subject"];
$content = $_POST["content"];
$toEmail ="[email protected]";
$mailHeaders ="From: " .$name. "<" .$email .">\r\n";
if(@mail($toEmail, $subject, $content, $mailHeaders)){
$alert=true;
}else
{
//alert for error
$alert=false;
//echo "Error Submiting the form!.";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/2.0.2/anime.min.js"></script>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<title>Food</title>
<link rel="stylesheet" href="style-sec.css" />
<!-- Load icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<header>
<a href="#" class="logo">Food<span>.</span></a>
<ul class="navigation">
<li>
<a href="./index.php#banner">Home</a>
</li>
<li>
<a href="#./index.phpabout">About</a>
</li>
<li>
<a href="./index.php#menu">Menu</a>
</li>
<li>
<a href="./index.php#expert">Expert</a>
</li>
<li>
<a href="./index.php#testimonials">Testimonials</a>
</li>
<li>
<a href="./index.php#contact">Contact</a>
</li>
</ul>
</header>
<!-- <video autoplay muted loop id="myVideo">
<source src="img/vd3.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video> -->
<section class="banner" id="banner" data-aos="zoom-out-up" data-aos-duration="2500">
<div class="content">
<div style="height:200px;">
<?php
if($alert){
echo'
<section class="contact" id="contact">
<div class="title">
<h2 class="titleText">Your <span>C</span>ontact Us Form Sucessfully Submitted!</h2>
<p>We have recived your request sucessfully, <a style="text-decoration:none;" href="./index.php">Click Here</a> to go back to Homepage.</p>
</section>';
}else {
echo'
<section class="contact" id="contact">
<div class="title">
<h2 class="titleText">Your <span>C</span>ontact Us Form Submission Failed!</h2>
<p>Something went wrong during processing your request, Please <a style="text-decoration:none;" href="./index.php#contact">Click Here</a> to Try Again.</p>
</section>';
}
?>
</div>
</section>
<footer>
<!-- for copyright -->
<div class="copyrightText">
<p>Copyright 2021 <a href="#">Institute Of Technolgy Korba</a>.All right Reserved</p>
</div>
</div>
</footer>
<script type="text/javascript">
// for making sticky nav scrolling
window.addEventListener("scroll", function() {
const header = document.querySelector('header');
header.classList.toggle("sticky", window.scrollY > 0);
});
// Open the full screen search box
function openSearch() {
document.getElementById("myOverlay").style.display = "block";
}
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
<script src="main.js"></script>
</body>
</html>