I seem to having an issue with a form i made. I can't get it to read properly on my localhost server. I have everything installed properly but i think there is an issue with my code.
form.php
PHP Code:<?php include_once( "form.lib.php" ); ?>
<html>
<head>
<!-- Begin: Form -->
<?php
if( !$isHideForm ):
global $sErr ;
if( $sErr ) print "<br><a name='error'></a><center><font class='form_error' >$sErr</font></center><br>";
$starColor = $sErr ? "#ff0000" : "#000000";
$style=" class='form_text' ";
?>
<form name="frmFormMail" action="<?php print PHP_SELF ?>" method='post' enctype='multipart/form-data'>
<input type='hidden' name='formmail_submit' value='Y'>
<input type='hidden' name='esh_formmail_subject' value="Appointment Leads">
<input type='hidden' name='esh_formmail_return_subject' value="Appointment Set Thank You!">
<input type='hidden' name='esh_formmail_return_msg' value="You appointment has been set and a representative
will be sent to the address given for your free
estimate.
Thank you
CC Carpet
Bes Prices Everyday!">
<table cellspacing='16' cellpadding='0' border='0' >
<tr>
<td class="form_field" valign='top' align='right'>First Name </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<input type="text" name="First_Name" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "First_Name" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Last Name </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<input type="text" name="Last_Name" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Last_Name" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Spouse's_First </td><td width='10' aligh='right' valign='top'></td>
<td class="form_text">
<input type="text" name="Spouse_s_First" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Spouse_s_First" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Spouse's_Last </td><td width='10' aligh='right' valign='top'></td>
<td class="form_text">
<input type="text" name="Spouse_s_Last" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Spouse_s_Last" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Street Address </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<input type="text" name="Street_Address" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Street_Address" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>City </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<input type="text" name="City" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "City" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>State </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<input type="text" name="State" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "State" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Zip </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<input type="text" name="Zip" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Zip" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Main Phone </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<input type="text" name="Main_Phone" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Main_Phone" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Secondary Phone </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<input type="text" name="Secondary_Phone" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Secondary_Phone" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Email </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<input type="email" name="Email" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Email" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Residential </td><td width='10' aligh='right' valign='top'></td>
<td class="form_text">
<input type="checkbox" name="Checkbox01_Residential" value="<?php formChecked( $HTTP_POST_VARS[ "Checkbox01_Residential" ], "" ); ?>" > <br>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Interested In? </td><td width='10' aligh='right' valign='top'></td>
<td class="form_text">
<input type="text" name="Interested_In" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Interested_In" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>How did you hear about us? </td><td width='10' aligh='right' valign='top'></td>
<td class="form_text">
<input type="text" name="How_did_you_hear_about_us" value="<?php print HtmlSpecialChars( $HTTP_POST_VARS[ "How_did_you_hear_about_us" ] ); ?>" class='text_box'>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Appointment Date </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<?php
selectList( "Appointment_Date_MM", $HTTP_POST_VARS["Appointment_Date_MM"], 1, 12, "MM", $style ) ;
selectList( "Appointment_Date_DD", $HTTP_POST_VARS["Appointment_Date_DD"], 1, 31, "DD", $style ) ;
selectList( "Appointment_Date_YYYY", $HTTP_POST_VARS["Appointment_Date_YYYY"], date("Y"), date("Y")+3, "YYYY", $style ) ;
?>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Appointment Time </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<?php
selectList( "Appointment_Time_HH", $HTTP_POST_VARS["Appointment_Time_HH"], 0, 23, "HH", $style ) ;
selectList( "Appointment_Time_MM", $HTTP_POST_VARS["Appointment_Time_MM"], 0, 59, "MM", $style ) ;
?>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Alternate Date </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<?php
selectList( "Alternate_Date_MM", $HTTP_POST_VARS["Alternate_Date_MM"], 1, 12, "MM", $style ) ;
selectList( "Alternate_Date_DD", $HTTP_POST_VARS["Alternate_Date_DD"], 1, 31, "DD", $style ) ;
selectList( "Alternate_Date_YYYY", $HTTP_POST_VARS["Alternate_Date_YYYY"], date("Y"), date("Y")+3, "YYYY", $style ) ;
?>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Alternate Time </td><td width='10' aligh='right' valign='top'> <font size='2' color='#ff0000'>*</font> </td>
<td class="form_text">
<?php
selectList( "Alternate_Time_HH", $HTTP_POST_VARS["Alternate_Time_HH"], 0, 23, "HH", $style ) ;
selectList( "Alternate_Time_MM", $HTTP_POST_VARS["Alternate_Time_MM"], 0, 59, "MM", $style ) ;
?>
</td>
</tr>
<tr>
<td class="form_field" valign='top' align='right'>Comments? </td><td width='10' aligh='right' valign='top'></td>
<td class="form_text">
<textarea name="Comments" rows=4 cols=25 ><?php print HtmlSpecialChars( $HTTP_POST_VARS[ "Comments" ] ); ?></textarea>
</td>
</tr>
<tr><td colspan=3 align='center'><input type='submit' value='Submit'> <input type='button' value='Cancel' onClick="location.href='/';"></td></tr>
</table>
</form>
<!-- End: -->
<?php
if( $sErr ) print "<script language='javascript' type='text/javascript'>location.href='#error';</script>";;;
else: //!$isHideForm
print( "<br><br><hr><center><b>Your form has been sent. Thank you.</b><br><br><input type='button' value='Home' onclick=\"location.href='/';\"></center><br><br>" );
endif; //!$isHideForm
?>



Reply With Quote
Bookmarks