jeremyb
07-16-2003, 07:31 PM
I am having a problem with an online questions or comment form, hopefully someone here can help me out. The strange this here is that on one php server the form works fine and on another php server the form processes the information fine but the email is never received displaying the content. Now, I am not 100% sure but I think the two different server are running two different version of php. Here is a copy of my code.
__________________________________________
questions.php
__________________________________________
<body bgcolor="#E0E0E0">
<div align="center"><img src="images/title.gif" width="750" height="50"> <br>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="158" align="left" valign="top"><?php include("nav.php"); ?></td>
<td valign="top"> <div align="center">
<table width="580" border="1" align="right" cellpadding="7" cellspacing="0" bordercolor="#000066" bgcolor="#FFFFFF">
<tr>
<td><div align="left">
<table width="100%" border="1" cellpadding="3" bordercolor="#000066">
<tr bgcolor="#999999">
<td><div align="center"><font color="#FFFFFF" size="3" face="Verdana, Arial, Helvetica, sans-serif"><strong>Questions
or Comments</strong></font></div></td>
</tr>
<tr bgcolor="#999999">
<td width="100%" bgcolor="#FFFFFF">
<div align="center">
<p><font color="#000066" size="3" face="Verdana, Arial, Helvetica, sans-serif">Please
fill out the following online form locate below<br>
and will get back with you shortly.<br>
<font color="#FF0000" size="2">* means required field</font></font></p>
<form method="post" action="sendquestions.php">
<div align="justify">
<p> Name:
<input name="name" type="text" id="name" size="45">
<font color="#FF0000">*</font><br>
<br>
Address:
<input name="address" type="text" id="address" size="45">
<br>
<br>
City:
<input name="city" type="text" id="city">
State:
<input name="state" type="text" id="state" size="5">
Zip:
<input name="zip" type="text" id="zip" size="10">
<br>
<br>
Phone:
<input name="phone" type="text" id="phone">
Fax:
<input name="fax" type="text" id="fax">
<br>
<br>
Email:
<input name="email" type="text" id="email" size="70">
<font color="#FF0000">*</font></p>
</div>
<p>How would you like to be contacted:<font color="#000066" size="3" face="Verdana, Arial, Helvetica, sans-serif">
<select name="contact" id="contact">
<option value="Select One" selected>Select One</option>
<option value="Phone">Phone</option>
<option value="Fax">Fax</option>
<option value="Email">Email</option>
</select>
<font color="#FF0000">*</font><br>
<br>
</font><font color="#000000" size="3">Question or
Comment:</font><font color="#000066" size="3" face="Verdana, Arial, Helvetica, sans-serif"><br>
<br>
<textarea name="question" cols="60" rows="10" id="question"></textarea>
</font> <font color="#FF0000">*</font><font color="#000066" size="3" face="Verdana, Arial, Helvetica, sans-serif"><br>
<br>
<input type="submit" name="Submit" value="Submit">
<br>
</font></p>
</form>
<p> </p>
</div></td>
</tr>
</table>
<br>
</div>
</td>
</tr>
</table>
</div>
<br> <div align="center"></div></td>
</tr>
</table>
</div>
</body>
___________________________________________________
sendquestions.php
___________________________________________________
<body bgcolor="#E0E0E0">
<div align="center"><img src="images/title.gif" width="750" height="50"> <br>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="158" align="left" valign="top"><?php include("nav.php"); ?><br>
<div align="center"></div></td>
<td valign="top"> <div align="center">
<table width="580" border="1" align="right" cellpadding="7" cellspacing="0" bordercolor="#000066" bgcolor="#FFFFFF">
<tr>
<td> <p align="center"><font size="2">
<?
$dufrene = "Dufrene Building Materials";
$dufreneemail = "jeremyb@mobiletel.com";
if (($name == "") or ($email == "") or ($contact == "") or ($question == ""))
{
print ("The following fields need to be filled out before the form can be sent:<br>
Name, Email, Contact, and Question or Comment.
<br>Please hit the back key on your browser and
make sure that these fields are filled in. Thank You!");
} else {
print ("<font face=\"Arial, Helvetica, sans-serif\" color=\"#336699\">Thank you $name for
submitting a a question or comment. Someone will contact you shortly.</font></font>");
mail(
"jeremyb@mobiletel.com",
"Question or Comment from website",
"Name: $name
Address: $address
City: $city
State: $state
Zip: $zip
Phone: $phone
Fax: $fax
Email: $email
Please contact me by: $contact
Question or Comment: $question
",
"From: ".$customer." <".$email.">\nX-Mailer: PHP/" . phpversion());
mail(
"$email",
"Questions or Comments Auto response",
"Thank you for submitting a question or comment. Someone will contact you shortly.
You submitted the following
Name: $name
Address: $address
City: $city
State: $state<br>
Zip: $zip
Phone: $phone
Fax: $fax
Email: $email
Please contact me by: $contact
Question or Comment: $question
",
"From: ".$dufrene." <".$dufreneemail.">\nX-Mailer: PHP/" . phpversion());
?>
</font></p>
<font size="2">
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td> <div align="center">
<p><font face="Arial, Helvetica, sans-serif" size="2" color="#336699">You
submitted the following information:</font></p>
<p align="center"><font face="Arial, Helvetica, sans-serif" size="2" color="#336699"><?echo "$name";?><br>
<?echo "$address";?><br>
<?echo "$city, $state $zip";?><br>
<?echo "$phone";?><br>
<?echo "$fax";?><br>
<?echo "$email";?><br><br>
<?echo "$question";?><br>
</font></div></td>
</tr>
</table>
<?
}
?>
</font>
<div align="left"><br>
</div>
</td>
</tr>
</table>
</div>
<br> <div align="center"></div></td>
</tr>
</table>
</div>
</body>
_________________________________________________
any help would be greatly appreciated.
Thanks,
Jeremy Blanchard
jeremyb@ndanet.com
__________________________________________
questions.php
__________________________________________
<body bgcolor="#E0E0E0">
<div align="center"><img src="images/title.gif" width="750" height="50"> <br>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="158" align="left" valign="top"><?php include("nav.php"); ?></td>
<td valign="top"> <div align="center">
<table width="580" border="1" align="right" cellpadding="7" cellspacing="0" bordercolor="#000066" bgcolor="#FFFFFF">
<tr>
<td><div align="left">
<table width="100%" border="1" cellpadding="3" bordercolor="#000066">
<tr bgcolor="#999999">
<td><div align="center"><font color="#FFFFFF" size="3" face="Verdana, Arial, Helvetica, sans-serif"><strong>Questions
or Comments</strong></font></div></td>
</tr>
<tr bgcolor="#999999">
<td width="100%" bgcolor="#FFFFFF">
<div align="center">
<p><font color="#000066" size="3" face="Verdana, Arial, Helvetica, sans-serif">Please
fill out the following online form locate below<br>
and will get back with you shortly.<br>
<font color="#FF0000" size="2">* means required field</font></font></p>
<form method="post" action="sendquestions.php">
<div align="justify">
<p> Name:
<input name="name" type="text" id="name" size="45">
<font color="#FF0000">*</font><br>
<br>
Address:
<input name="address" type="text" id="address" size="45">
<br>
<br>
City:
<input name="city" type="text" id="city">
State:
<input name="state" type="text" id="state" size="5">
Zip:
<input name="zip" type="text" id="zip" size="10">
<br>
<br>
Phone:
<input name="phone" type="text" id="phone">
Fax:
<input name="fax" type="text" id="fax">
<br>
<br>
Email:
<input name="email" type="text" id="email" size="70">
<font color="#FF0000">*</font></p>
</div>
<p>How would you like to be contacted:<font color="#000066" size="3" face="Verdana, Arial, Helvetica, sans-serif">
<select name="contact" id="contact">
<option value="Select One" selected>Select One</option>
<option value="Phone">Phone</option>
<option value="Fax">Fax</option>
<option value="Email">Email</option>
</select>
<font color="#FF0000">*</font><br>
<br>
</font><font color="#000000" size="3">Question or
Comment:</font><font color="#000066" size="3" face="Verdana, Arial, Helvetica, sans-serif"><br>
<br>
<textarea name="question" cols="60" rows="10" id="question"></textarea>
</font> <font color="#FF0000">*</font><font color="#000066" size="3" face="Verdana, Arial, Helvetica, sans-serif"><br>
<br>
<input type="submit" name="Submit" value="Submit">
<br>
</font></p>
</form>
<p> </p>
</div></td>
</tr>
</table>
<br>
</div>
</td>
</tr>
</table>
</div>
<br> <div align="center"></div></td>
</tr>
</table>
</div>
</body>
___________________________________________________
sendquestions.php
___________________________________________________
<body bgcolor="#E0E0E0">
<div align="center"><img src="images/title.gif" width="750" height="50"> <br>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="158" align="left" valign="top"><?php include("nav.php"); ?><br>
<div align="center"></div></td>
<td valign="top"> <div align="center">
<table width="580" border="1" align="right" cellpadding="7" cellspacing="0" bordercolor="#000066" bgcolor="#FFFFFF">
<tr>
<td> <p align="center"><font size="2">
<?
$dufrene = "Dufrene Building Materials";
$dufreneemail = "jeremyb@mobiletel.com";
if (($name == "") or ($email == "") or ($contact == "") or ($question == ""))
{
print ("The following fields need to be filled out before the form can be sent:<br>
Name, Email, Contact, and Question or Comment.
<br>Please hit the back key on your browser and
make sure that these fields are filled in. Thank You!");
} else {
print ("<font face=\"Arial, Helvetica, sans-serif\" color=\"#336699\">Thank you $name for
submitting a a question or comment. Someone will contact you shortly.</font></font>");
mail(
"jeremyb@mobiletel.com",
"Question or Comment from website",
"Name: $name
Address: $address
City: $city
State: $state
Zip: $zip
Phone: $phone
Fax: $fax
Email: $email
Please contact me by: $contact
Question or Comment: $question
",
"From: ".$customer." <".$email.">\nX-Mailer: PHP/" . phpversion());
mail(
"$email",
"Questions or Comments Auto response",
"Thank you for submitting a question or comment. Someone will contact you shortly.
You submitted the following
Name: $name
Address: $address
City: $city
State: $state<br>
Zip: $zip
Phone: $phone
Fax: $fax
Email: $email
Please contact me by: $contact
Question or Comment: $question
",
"From: ".$dufrene." <".$dufreneemail.">\nX-Mailer: PHP/" . phpversion());
?>
</font></p>
<font size="2">
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td> <div align="center">
<p><font face="Arial, Helvetica, sans-serif" size="2" color="#336699">You
submitted the following information:</font></p>
<p align="center"><font face="Arial, Helvetica, sans-serif" size="2" color="#336699"><?echo "$name";?><br>
<?echo "$address";?><br>
<?echo "$city, $state $zip";?><br>
<?echo "$phone";?><br>
<?echo "$fax";?><br>
<?echo "$email";?><br><br>
<?echo "$question";?><br>
</font></div></td>
</tr>
</table>
<?
}
?>
</font>
<div align="left"><br>
</div>
</td>
</tr>
</table>
</div>
<br> <div align="center"></div></td>
</tr>
</table>
</div>
</body>
_________________________________________________
any help would be greatly appreciated.
Thanks,
Jeremy Blanchard
jeremyb@ndanet.com