wow.. cool answer.I'm going to enjoy figering that code out. Really appreciated.
I have just had an idea. Can I some how tag the HTML submit form with a tag identifiing it as comming from that page. This tag will be sent to me by the php form along with other user inputed details. That way many HTML pages can use one php mail page. And I will know what page the user was using.
I have included both my HTML code as well as the php code.. these are 2 seperate files...
Once again thx....
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>feed back</title>
</head>
<body>
<br>
<form action="mail.php" method="post">
<table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr style="font-family: Arial;">
<td style="background-color: rgb(255, 204, 102); width: 160px;">Your
Name: </td>
<td style="width: 1034px;"><input size="50" name="name"></td>
<td></td>
</tr>
<tr style="font-family: Arial;">
<td style="background-color: rgb(153, 255, 255); width: 160px;">E-mail:
</td>
<td style="width: 1034px;"><input size="50" name="email"></td>
<td></td>
</tr>
<tr style="font-family: Arial;">
<td style="background-color: rgb(255, 204, 102); width: 160px;">www</td>
<td style="width: 1034px;"><input disabled="disabled" value="Peter is cool" size="50" name="www"></td>
<td></td>
</tr>
<tr>
<td style="background-color: rgb(255, 255, 102); vertical-align: top; font-family: Arial; width: 160px;">Comments</td>
<td style="width: 1034px;"><textarea cols="60" rows="10" name="comments"></textarea></td>
<td></td>
</tr>
</tbody>
</table>
<input value="Submit" type="submit"></form>
</body>
</html>
********php code that form uses********
<?
function checkOK($field)
{
if (eregi("\r",$field) || eregi("\n",$field)){
die("Invalid Input!");
}
}
$www=$POST['www'];
checkOK($www);
$name=$POST['name'];
checkOK($name);
$email=$POST['email'];
checkOK($email);
$comments=$POST['comments'];
checkOK($comments);
$to="mpskinner@woosh.co.nz";
$message="Name: $name \n\nComment:\n$comments\n\nE-mail Address: $email\n\n www $www";
mail($to,"Comments From Your Site",$message,"From: $email\n");
header( "Location: http://kiwioffice.com/feedback.html" );
?>