I was wondering if anybody could help me, im trying to get a form mailed to my e-mail address. I have a form page with the action tag linking to the php page to send the form.
I have no problems recieving the email it appears in just seconds it just takes a long time for the page to update and display notification that the message has been sent.
Heres my code,
form.html
<html>
<head>
<title></title>
</head>
<body>
<center>
<font size="7" face="Arial" color="#008000"><b>Comments</b> </font>
<p><font face="Arial"><b>Please enter any comments or suggestions</b></font></p>
<form method="POST" action="sent.php">
<table border="0" cellpadding="5" cellspacing="0" style="border-left:2px solid #C0C0C0; border-right:2px solid #000000; border-top:2px solid #C0C0C0; border-bottom:2px solid #000000; border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" width="567">
<tr>
<td width="550" height="22" bgcolor="#BBCCAA" colspan="2" style="border-left-width: 1; border-right-width: 1; border-top-width: 1; border-bottom: 1px solid #008000">
<b><font face="Arial" size="1" color="#008000">Comments</font></b></td>
</tr>
<tr>
<td width="129" height="22" bgcolor="#ECE9D8"><font face="Arial"><b>Name:</b></font></td>
<td width="421" height="22" bgcolor="#ECE9D8"><input type="text" name="name" size="35"></td>
</tr>
<tr>
<td width="129" height="22" bgcolor="#ECE9D8"><font face="Arial"><b>E-Mail Address:</b></font></td>
<td width="421" height="22" bgcolor="#ECE9D8">
<input type="text" name="email" size="35"></td>
</tr>
<tr>
<td width="129" height="17" bgcolor="#ECE9D8"><font face="Arial"><b>Comments:</b></font></td>
<td width="421" height="17" bgcolor="#ECE9D8"><textarea rows="6" name="comments" cols="50"></textarea></td>
</tr>
<tr>
<td width="129" height="19" bgcolor="#ECE9D8"> </td>
<td width="421" height="19" bgcolor="#ECE9D8">
<input type="submit" value="Submit" name="B1" style="float: right"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
sent.php
<html>
<?
$message = "Name: ".$name."\n"."e-mail: ".$email."\n\n"."Comments: ".$comments;
ini_set("SMTP","-----------------");
ini_set("sendmail_from","--------------------");
mail("steven.welsh@-------------------", "Web Site", $message);
echo "message sent";
exit;
?>
</html>