-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapply_send.php
90 lines (76 loc) · 3.29 KB
/
apply_send.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
<!DOCTYPE html>
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if IE 9 ]><html class="ie ie9" lang="en"> <![endif]-->
<html lang="en">
<head>
<!-- Basic Page Needs -->
<meta charset="utf-8">
<title>LEARN - Courses, Education site template</title>
<meta name="description" content="">
<meta name="author" content="Ansonika">
<!-- Favicons-->
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon"/>
<link rel="apple-touch-icon" type="image/x-icon" href="img/apple-touch-icon-57x57-precomposed.png">
<link rel="apple-touch-icon" type="image/x-icon" sizes="72x72" href="img/apple-touch-icon-72x72-precomposed.png">
<link rel="apple-touch-icon" type="image/x-icon" sizes="114x114" href="img/apple-touch-icon-114x114-precomposed.png">
<link rel="apple-touch-icon" type="image/x-icon" sizes="144x144" href="img/apple-touch-icon-144x144-precomposed.png">
<!-- Mobile Specific Metas -->
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no">
<!-- CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="http://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="http://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="font-awesome/css/font-awesome-ie7.min.css">
<![endif]-->
<script type="text/javascript">
function delayedRedirect(){
window.location = "index.html"
}
</script>
</head>
<body onLoad="setTimeout('delayedRedirect()', 5000)">
<?php
$mail = $_POST['email'];
/*$subject = "".$_POST['subject'];*/
$to = "[email protected]"; /* YOUR EMAIL HERE */
$subject = "Subscription from LEARN";
$headers = "From: Subscription from LEARN <[email protected]>";
$message = "USER INFO\n";
$message .= "\nName: " . $_POST['firstname'];
$message .= "\nLast Name: " . $_POST['lastname'];
$message .= "\nEmail: " . $_POST['email'];
$message .= "\nTelephone: " . $_POST['phone2'];
$message .= "\nCountry: " . $_POST['country'];
$message .= "\nAge: " . $_POST['age'];
$message .= "\nGender: " . $_POST['gender'];
$message .= "\nTerms and conditions accepted: " . $_POST['terms'] . "\n";
$message .= "\nPreferences?\n" ; /* CHECKBOXES */
foreach($_POST['course_1'] as $value)
{
$message .= "- " . trim(stripslashes($value)) . "\n";
};
$message .= "\nOptional message: " . $_POST['message_apply_1'];
//Receive Variable
$sentOk = mail($to,$subject,$message,$headers);
$user = "$mail";
$usersubject = "Thank You";
$userheaders = "From: [email protected]\n";
$usermessage = "Thank you for contact LEARN. We will reply shortly with more details.";
mail($user,$usersubject,$usermessage,$userheaders);
?>
<!-- END SEND MAIL SCRIPT -->
<div class="container">
<div class="row">
<div class="col-md-12" style="text-align:center; padding-top:80px;">
<h1 style="color:#333">Thank you!</h1>
<h3 style="color: #6C3">Form Successfully Submitted.</h3>
<p>You will be redirect back in 5 seconds.</p>
</div>
</div>
</div>
</body>
</html>