-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
executable file
·139 lines (121 loc) · 3.57 KB
/
contact.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
136
137
138
139
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Irish Networking - Contact us</title>
<link rel="stylesheet"
type="text/css"
media="screen"
href="styles.css" />
<link rel="stylesheet"
type="text/css"
media="print"
href="print.css" />
<script type="text/javascript"
src="javascript.js">
</script>
<meta http-equiv="content-type"
content="text/html; charset=iso-8859-1" />
<meta name="robots"
content="all" />
</head>
<body>
<div id="container">
<!-- Start the header -->
<div id="pageHeader">
<h1>Irish Networking</h1>
<h2>Making IT happen</h2>
</div><!-- End the header -->
<div id="bannerContainer">
<div id="navcontainer">
<ul>
<li><a href="index.html">Information</a></li>
<li><a href="Login.php">Login</a></li>
<li><a href="contact.php"
id="current"
name="current">Contact us</a></li>
</ul>
</div>
</div><!-- End the Header -->
<!-- Start the breadbrumb -->
<br style="clear: both;" />
<div id="breadcrumbcontainer"></div><!-- end the breadbrumb -->
<!-- Start the side content -->
<div id="sidebarContainer">
<img src="images/sidebar_top.png"
name=""
border="0"
width="167"
height="11" />
<div class="sidebar"></div>
<div class="sidebar"></div>
</div><!-- End sidebar content -->
<!-- Start the main content -->
<div id="contentContainer">
<div id="content">
<?
$email = $_POST["email"];
$comments = $_POST["comments"];
$name = $_POST["name"];
$subject = $_POST["subject"];
$msg = "Name: " . $name ." Comments: " . $comments;
$headers .= "From: $name <$email>";
if($email)
{
$sent = mail("[email protected]", $subject, $msg, $headers);
}
if($sent)
{
echo "<strong>Thank you, your email has been sent.</strong>";
$sent = "";
$msg = "";
$subject = "";
$headers = "";
$comments = "";
$name = "";
}
elseif ($name || $subject || $comments)
{
echo "<strong>Error, Mail not sent.</strong>" ;
}
else
{
echo "<strong>Fill in the form below to send me an email.</strong>";
}
?>
<form action="contact.php"
method="post">
<p>Your Name:
<br />
<input type="text"
name="name"
size="40" /></p>
<p>Your Email:
<br />
<input type="text"
name="email"
size="40" /></p>
<p>Message Subject:
<br />
<input type="text"
name="subject"
size="40" /></p>
<p>Message:
<br />
<textarea name="comments"
rows="8"
cols="38">
</textarea></p>
<p><input type="submit"
name="submitButtonName"
value="Send Mail" /></p>
</form>
</div>
</div><!-- End Main content -->
<br style="clear: both;" />
<div id="footer">
© 2005 Irish Networking
</div>
</div>
</body>
</html>