Thanks, but I haven't understood your answer.
I asked two questions. The 2nd of which you have answered/I have understood.
Let me restate the 1st question again (hopefully better).
1 - I have a contact.php form - which contains the basic form, and is re-used to send the email and to respond to the visitor.
It contains all the usual html to display the form & fields, and a submit button.
Here are the important lines of code: (... represents lines removed for clarity)
<form name="form1" method="POST" action="contact.php">
...
<?php
if ($submit && !$errors) {
echo ("Thank you for contacting us. Your Contact form has been submitted.");}
?>
...
<input name="firstName" type="text" class="TEXTFIELD" id="firstName" size="24" maxlength="30">
<input name="lastName" type="text" class="TextField" id="lastName" size="21" maxlength="50">
...
<input name="submit" type="submit" class="submit" value="Submit"></td>
</form>
at the bottom of the code is a section (see below) that sends the email:
<?php
if ($submit && !$errors){
$message="
Name: $firstName $lastName
//lots more variables removed here for clarity
";
$headers = "From: $firstName $lastName <$eMail>\r\n";
...
mail("our_email address", "title", $message, $headers');
}
?>
The code works with php4, but with php5 I get the following errors/warnings:
Notice: Undefined variable: submit in ...contact.php on line 199
Notice: Undefined variable: submit in ...contact.php on line 380