Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP on IIS 6 and getting a contact page to work.....

Status
Not open for further replies.

blubomber

MIS
Dec 27, 2001
241
US
Well, i got my brother's PHP site running on his windows 2003 server. now he has a contact page in his site that does not work as intended. The page comes up and allows the user to fill out the information, once the user clicks on the "send" button, the page indicates it has been sent. On the other side, the email does come through from the contact page but there is not content. none of the information the user fills out comes over.

Any ideas on the cause of this? I have gone through the php.ini file but cant find much. That is where in enabled the smtp support.

Any help would be greatly appreciated.

PS. Server is Windows 2003 SBS running IIS 6 with all the updates. PHP loaded on the server is 5.x, sorry i cant remember the exact version.
 
Can we see the code that parses the form, and sends the email, or should we guess?

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
I agree with vacunita!

but i suspect that the script you are using to run the contact form makes an assumption on register globals being turned on and the nice shiny new version of php sensibly has RG turned off.
 
Thank you for the replies. I will get the posted, thanks for the help in advance.
 
Sorry for the delay, here is the PHP code,

<?php
session_start();

$errors=0;
if(isset($_POST['Submit']))
{
$number = $_POST['number'];
if($number != $_SESSION["image_value"])
$response = '<span class="required">Invalid Verification!</span>';
else
{
$message .= "<p><font face='arial'>This message originated from the \"Contact\" page of the Company website.</p>
<p><font face='arial'>Name: " . $name . "<br>Occupation: " . $occupation . "<br>Telephone: " . $phone . "<br>Email: " . $emailAddy . "<br>Question or Comment: " . $comments . "</p>";
$headers .= "MIME-Version: 1.0 \n";
$headers .= "Content-type: text/html; charset=iso-8859-1 \n";
$headers .= "From: system@company.com\r\nReply-To: " . $emailAddy . "\r\n";
mail ("info@company.com", $subject, $message, $headers);

header("Location: company_contactConfirm.php");
}
}
?>
<html><!-- InstanceBegin template="/templates/main.dwt" codeOutsideHTMLIsLocked="false" -->
<head>

<!-- InstanceBeginEditable name="Head" -->
<title>Company, LLC</title>
<meta name="description" content="">
<meta name="keywords" content="">
<!-- InstanceEndEditable -->
<meta name="author" content="Compnay Web Design">
<meta name="robots" content="follow,index">
<meta name="revisit-after" content="30 days">
<meta name="distribution" content="Global">
<meta name="rating" content="Safe For Kids">
<link rel="shortcut Icon" href="favicon.ico">
<meta http-equiv="content-Language" content="en-us">
<link href="lib/style.css" rel="stylesheet" type="text/css">
<script src="lib/script.js" type="text/javascript"></script>
<script src="lib/AC_RunActiveContent.js" type="text/javascript"></script>
<meta http-equiv="refresh">
</head>

<body class="layout" leftmargin="0">
<table align="center" width="760" border="0" cellspacing="0" cellpadding="10" id="Company, LLC">
<tr bgcolor="#000000">
<td><?php include('includes/header.php'); ?></td>
</tr>
<tr bgcolor="#000000">
<td><table width="740" border="0" cellspacing="0" cellpadding="0" id="Company, LLC">
<tr>
<td><img src="images/horiz.gif"></td>
</tr>
<tr>
<td><!-- InstanceBeginEditable name="FlashHeader" --><script type="text/javascript">
AC_FL_RunContent( 'codebase',' ); //end AC code
</script><noscript><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" width="740" height="200" id="contact" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="images/flash/contact.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<param name="wmode" value="transparent" />
<embed src="images/flash/contact.swf" quality="high" bgcolor="#000000" width="740" height="200" name="contact" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" />
</object></noscript><!-- InstanceEndEditable --></td>
</tr>
<tr>
<td><img src="images/horiz.gif"></td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#000000">
<td><table border="0" cellspacing="0" cellpadding="0" id="Company, LLC">
<tr>
<td><table width="740" border="0" cellspacing="0" cellpadding="0" id="Company, LLC">
<tr>
<td width="200" valign="top"><!-- InstanceBeginEditable name="Title" --><img src="images/titles/contact.gif"><!-- InstanceEndEditable --></td>
<td width="540" rowspan="2" valign="top" class="goldCopy"><!-- InstanceBeginEditable name="Content" --><form action="Company_contact.php" method="post" id="frmCaptcha" name="frmCaptcha" onSubmit="return validateContact(this);">
<table width="540" border="0" cellspacing="0" cellpadding="0" id="Company, LLC">
<tr class="copy">
<td width="240">Name:<span class="required">*</span></td>
<td width="300"><input type="text" class="formField" name="name" size="20" maxlength="120"></td>
</tr>
<tr class="copy">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="copy">
<td>Occupation or Company:</td>
<td><input type="text" class="formField" name="occupation" size="20" maxlength="120"></td>
</tr>
<tr class="copy">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="copy">
<td>Daytime Phone:</td>
<td><input type="text" class="formField" name="phone" size="20" maxlength="120"></td>
</tr>
<tr class="copy">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="copy">
<td>Email:<span class="required">*</span></td>
<td><input type="text" class="formField" name="emailAddy" size="20" maxlength="120"></td>
</tr>
<tr class="copy">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="copy">
<td>Subject:<span class="required">*</span></td>
<td><input type="text" class="formField" name="subject" size="20" maxlength="120"></td>
</tr>
<tr class="copy">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="copy">
<td valign="top">Questions/Comments:<span class="required">*</span></td>
<td><textarea cols="35" rows="5" wrap="VIRTUAL" class="formField" name="comments"></textarea></td>
</tr>
<tr class="copy">
<td colspan="2"><hr noshade="noshade" color="#666666" size="1"></td>
</tr>
<tr class="copy">
<td valign="top" class="small">NOTE: You must enter the case sensative characters exactly as they appear in the image.</td>
<td valign="top"><img src="formVer/imageGen.php"></td>
</tr>
<tr class="copy">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="copy">
<td>Verification:<span class="required">*</span></td>
<td><table width="300" border="0" cellspacing="0" cellpadding="0" id="Compay, LLC">
<tr>
<td><input name="number" type="text" class="formField" size="20" id="number"></td>
<td><?php echo $response; ?></td>
</tr>
</table></td>
</tr>
<tr class="copy">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="copy">
<td colspan="2">Indicates a required field (<span class="required">*</span>)</td>
</tr>
<tr class="copy">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="copy">
<td width="240">&nbsp;</td>
<td width="300"><input id="Submit" type="submit" class="button" value="Send Message" name="Submit" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input name="Reset" type="reset" class="button" id="reset" value="Reset"></td>
</tr>
</table>
</form><!-- InstanceEndEditable --></td>
</tr>
<tr>
<td height="100" valign="bottom"><img src="images/titles/titlogo.gif" alt="Company, LLC"></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="images/horiz.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10"></td>
</tr>
<tr bgcolor="#000000">
<td align="center" class="smallGoldCopy"><?php include('includes/footer.php'); ?></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>



Thanks again for any help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top