Nate: Sorry if you are frustrated. I guess I should have referred you to the manual sooner. (I thought you knew about it.) It is where we can usually find answers to most of our questions.
Here is the link to the mail function within php.net: http://us3.php.net/manual/en/function.mail.php
There, you will find out about what is required for mail, usually only three things:
To/Subject/Message
However, on some servers, a header with the FROM address is required for the function to work.
OK. Your form looks good. I caught one more parse error and removed it. Then added HTML and body tags. OK:
<!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>Mail</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<?php
if (!isset($_POST['Submit'])){
?>
<form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
<table border="0" cellspacing="3" cellpadding="3" class="content">
<tr>
<td width="173" align="right">Name:</td>
<td width="151"><input type="text" name="name"></td>
<td width="121" align="right">Address 1:</td>
<td width="239"><input type="text" name="address1"></td>
</tr>
<tr>
<td><div align="right">Company:</div></td>
<td><input type="text" name="company"></td>
<td><div align="right">Address 2:</div></td>
<td><input type="text" name="address2"></td>
</tr>
<tr>
<td align="right">Title:</td>
<td><input type="text" name="title"></td>
<td align="right">City:</td>
<td><input type="text" name="city"></td>
</tr> <tr>
<td align="right">Email:</td>
<td><input type="text" name="email"></td>
<td align="right">State/Province:</td>
<td><input type="text" name="stateprovince"></td>
</tr> <tr>
<td rowspan="2" valign="top" align="right">How Did You Hear About Us:</td>
<td><input type="text" name="hearabout"></td>
<td align="right">Country:</td>
<td><input type="text" name="country"></td>
</tr> <tr>
<td> </td>
<td align="right">Zip Code:</td>
<td><input name="zipcode" type="text" size="8"></td>
</tr>
<tr>
<td valign="top"><div align="right">Sale Inquiry or Request:</div></td>
<td colspan="3">
<div align="left">
<textarea name="msgbody" cols="50" rows="10"></textarea>
</div>
</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit"
value="Send"></td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
<?php
}
else {
/* Convert ALL the values to variables */
$name = stripslashes($_POST['name']);
$company = stripslashes($_POST['company']);
$title = stripslashes($_POST['title']);
$address1 = stripslashes($_POST['address1']);
$address2 = stripslashes($_POST['address2']);
$city = stripslashes($_POST['city']);
$stateprovince = stripslashes($_POST['stateprovince']);
$zipcode = stripslashes($_POST['zipcode']);
// etc.
/* Layout your mail message */
$msg = 'Name: ' . $name . "\n";
$msg .= 'Company: ' . $company . "\n";
$msg .= 'Title: ' . $title . "\n";
$msg .= 'Address1: ' . $address1 . "\n";
$msg .= 'Address2: ' . $address2 . "\n";
$msg .= 'City: ' . $city . "\n";
$msg .= 'State: ' . $stateprovince . "\n";
$msg .= 'Zip Code: ' . $zipcode . "\n";
// etc.
/* Define any mail-specific variables */
$recipient = 'nate@company.com';
$header = 'From: ' . $name . ' <' . $email . '>' . "\r\n";
$subject = 'Email Message from:' . $name;
// etc.
/* mail */
$mail = mail($recipient, $subject, $msg, $header);
/* Confirm */
if($mail){
echo 'Mail sent';
}
else {
echo 'Message failed to send';
}
}
?>
</body>
</html>
Try and upload this to your server and try again.
Does that help? Have a read in the PHP.net manual via the link above. Then, check this out if you would like more information: http://codewalkers.com/tutorials/72/1.html
(This is a silly question, but you are saving the page with a .php file extension aren;t you?)