-
Notifications
You must be signed in to change notification settings - Fork 0
/
mail.php
60 lines (56 loc) · 1.24 KB
/
mail.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
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/contact.css" type="text/css" rel="stylesheet" title="default" media="all"/>
</head>
<body>
<div id="contactform">
<?
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
$to = "info@ettjavlabilspel.com";
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail($to, "Subject: $subject",
$message, "From: $email" );
echo "<p id='thank'>Thank you, we'll get back asap!</p>";
}
else
//if "email" is not filled out, display the form
{
echo "<table>
<tr><td>
<form method='post' action='mail.php'>
<p>Name</p>
</tr></td>
<tr><td>
<input class='sub' name='subject' type='text' autofocus='autofocus' required/>
</tr></td>
<tr><td>
<p>e-Mail</p>
</tr></td>
<tr><td>
<input class='sub' name='email' type='email' required/>
</tr></td>
<tr><td>
<p>Message</p>
</tr></td>
<tr><td>
<textarea name='message' rows='' cols='' required>
</textarea>
</tr></td>
<tr><td>
<input id='submit' type='submit' value='Send'/>
</form>
</tr></td>
</table>";
}
?>
</div>
</body>
</html>