-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
30 lines (22 loc) · 778 Bytes
/
index.php
File metadata and controls
30 lines (22 loc) · 778 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
27
28
29
30
<?php
// include 'index.html';
if(isset($_POST['name']) && isset($_POST['email']) && isset($_POST['message'])){
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
if(!empty($name) && !empty($email) && !empty($message)){
$to = 'admissions@vedasend.net';
$subject = 'Contact Us';
$body = $name."\n".$message;
$headers = 'From:'. $email;
mail($to, $subject, $body, $headers);
header("location: http://localhost/schoolProject/");
// if(mail($to, $subject, $body, $headers)){
// echo 'Thanks for contacting us';
// }
// else{
// echo 'Sorry an error occurred, please try again later.';
// }
}
}
?>