forked from gsanchit01/WebProjects
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.php
More file actions
26 lines (21 loc) · 687 Bytes
/
contact.php
File metadata and controls
26 lines (21 loc) · 687 Bytes
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
<!DOCTYPE html>
<html>
<body>
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$subject = 'New Form Submission';
$message = $_POST['message'];
$to = "jathinp74@gmail.com";
if(mail($to,$subject,"Name: ".$name."\nMessage: ".$message,$email))
{
echo '<script>alert("Your Messege has been sent")</script>';
}
else
{
echo '<script>alert("Your Messege has some Error\n *Please Try Again*")</script>';
}
?>
</body>
<head><meta http-equiv = "refresh" content = "0; url = contact.html" /></head>
</html>