Solved

PHP form submission error - may be down or configured incorrectly HTTP Error 500

Posted on 2013-01-31
6
658 Views
Last Modified: 2013-02-06
Hello,
  I have a PHP form that is not functioning properly. When I submit the completed form I get the following error:
The website encountered an error while retrieving http://xxxxxx.net/send_form_email.php. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

Here is the code from the page that validates and sends the form:
<?php
if(isset($_POST['email'])) {
     
    // EDIT THE 2 LINES BELOW AS REQUIRED
    $email_to = "commissions@realestateone.com";
    $email_subject = "Commission Verification";
     
     
    function died($error) {
        // your error code can go here
        echo "We are very sorry, but there were error(s) found with the form you submitted. ";
        echo "These errors appear below.<br /><br />";
        echo $error."<br /><br />";
        echo "Please go back and fix these errors.<br /><br />";
        die();
    }
     
    // validation expected data exists
    if(!isset($_POST['office']) ||
        !isset($_POST['address']) ||
        !isset($_POST['city']) ||
        !isset($_POST['state']) ||
		!isset($_POST['zipcode']) ||
        !isset($_POST['lgrosscomm']) ||
		!isset($_POST['lfixedcomm']) ||
        !isset($_POST['lbonus']) ||
        !isset($_POST['ltotal']) ||
        !isset($_POST['sgrosscomm']) ||
		!isset($_POST['sfixedcomm']) ||
        !isset($_POST['sbonus']) ||
        !isset($_POST['stotal']) ||
		!isset($_POST['total']) ||
        !isset($_POST['comments']) ||
        !isset($_POST['submitby']) ||
        !isset($_POST['email'])) {
        died('We are sorry, but there appears to be a problem with the form you submitted.');       
    }
     
    $office = $_POST['office']; // required
    $address = $_POST['address']; // required
    $city = $_POST['city'];//required
	$state = $_POST['state']//required
	$zip = $_POST['zipcode']//required
    $total = $_POST['total']; //required
    $comments = $_POST['comments']; // required
	$submitted_by = $_POST['submitby']; // required	
    $email_from = $_POST['email']; // required
    $error_message = "";
    $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
  if(!preg_match($email_exp,$email_from)) {
    $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
  }
    $string_exp = "/^[A-Za-z .'-]+$/";
  if(!preg_match($string_exp,$submitted_by)) {
    $error_message .= 'The Submitted By Name you entered does not appear to be valid.<br />';
  }
 
  }
  if(strlen($comments) < 2) {
    $error_message .= 'The Comments you entered do not appear to be valid.<br />';
  }
  if(strlen($error_message) > 0) {
    died($error_message);
  }
    $email_message = "Form details below.\n\n";
     
    function clean_string($string) {
      $bad = array("content-type","bcc:","to:","cc:","href");
      return str_replace($bad,"",$string);
    }
     
    $email_message .= "Submitted By: ".clean_string($submitted_by)."\n";
    $email_message .= "Email: ".clean_string($email_from)."\n";
    $email_message .= "Comments: ".clean_string($comments)."\n";
     
     
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);  
?>
 
<!-- include your own success html here -->
 
Thank you for contacting us. We will be in touch with you very soon.
 
<?php
}
?>

Open in new window

I cannot figure out what is wrong with this form. Thanks in advance for your assistance.

Here is the code from the form page in case you need to see it.
<h3>Commission Verification Form</h3>
<form name="commverify" method="post" action="send_form_email.php">
<table align="center">


<tr bgcolor="#007AC2" align="center"><td colspan="10">Please complete this form after closing to receive agent commision check.</td></tr>

  
  <tr><td>
Date</td><td><input id="date" name="date" />  <script type="text/javascript">   document.getElementById('date').value = Date(); </script> </td></tr>

    <tr><td>Office Number </td>
	<td><input type="text" name="office" size="5" /></td></tr>
     <tr><td>Address</td>
	<td><input type="text" name="address" size="12" /></td></tr>
     <tr><td>City</td>
	<td><input type="text" name="city" size="12" /></td></tr>
    <tr><td>State</td>
	<td><input type="text" name="state" size="12" /></td></tr>
     <tr><td>Zip Code</td>
	<td><input type="text" name="zipcode" size="12" /></td></tr>
    <tr>
	<td>Sale Price Change?</td>
	<td>Yes<input type="checkbox" value="yes" name="priceyes">No<input type="checkbox" value="no" name="priceno"></td></tr>
    <tr>
    <td>Title Company $ Rec'd</td>
    <td><input type="text" name="title_co" size="12" /></td></tr>
     <tr>
	<td>EMD on File</td>
	<td>Yes<input type="checkbox" value="yes" name="emdyes">No<input type="checkbox" value="no" name="emdno"></td></tr>
     <tr>
	<td>Ref pd @ Close:$</td>
	<td><input type="text" name="ref" size="12" /></td></tr>
     <tr><td>203 Revised?</td>
	<td><select Name="revised">
                                 	<option value=""></option>
<option value="Yes">Yes</option>
<option value="No">No</option></select></tr>
   
   
      <!---Prospect--->
    <tr bgcolor="#007AC2" align="center">
      <td colspan="10">Enter REO Commission(s) and Bonus**(no commas please)</td></tr>
     <tr><td>REO list gross commission</td>
	<td><input type="text" name="lgrosscomm" size="25" maxlength="50" /></td></tr>
    <tr><td>REO list fixed commission</td>
	<td><input type="text" name="lfixedcomm" size="25" maxlength="50" /></td></tr>
    <tr><td>REO list bonus</td>
	<td><input type="text" name="lbonus" size="25" maxlength="50" /></td></tr>
     <tr><td>REO List Total</td>
	<td><input type="text" name="ltotal" size="25" maxlength="50" /></td></tr>
    <tr><td>REO sale gross commissione</td>
	<td><input type="text" name="sgrosscomm" size="25" maxlength="50" /></td></tr>
    <tr><td>REO sale fixed commission</td>
	<td><input type="text" name="sfixedcomm" size="25" maxlength="50" /></td></tr>
    <tr><td>REO sale bonus</td>
	<td><input type="text" name="sbonus" size="25" maxlength="50" /></td></tr>
    <tr><td>REO Sale Total</td>
	<td><input type="text" name="stotal" size="25" maxlength="50" /></td></tr>
    <tr><td>Combined Total</td>
	<td><input type="text" name="total" size="25" maxlength="50" /></td></tr>
    <tr><td>Does the mortgage company on the HUD (page 1 box F) match the mortgage company originally entered on the 203?</td>
    <<td><select Name="morgage">
                                 	<option value=""></option>
<option value="Yes">Yes</option>
<option value="No">No</option></select></td></tr>
    <tr><td>If No, select mortgage company from the list.</td>
    <td><select Name="financing">
                                 	<option value=""></option>
<option value="Cash">Cash</option>
<option value="Land Contract">Land Contract</option>
<option value="John Adams Mortgage Company">John Adams Mortgage Company</option>
<option value="1st Security Mortgage">1st Security Mortgage</option>
<option value="A Best Financial Corp">A Best Financial Corp</option>
<option value="Academy Mortgage Co">Academy Mortgage Co</option>
<option value="Acceptance Capital Mortgage">Acceptance Capital Mortgage</option>
<option value="Acceptance Capital Mortgage">Acceptance Capital Mortgage</option>
<option value="ACME">ACME</option>
<option value="Advantage Mortgage Company">Advantage Mortgage Company</option>
<option value="Advisory Mortgage">Advisory Mortgage</option>
<option value="Aires Mortgage Solutions">Aires Mortgage Solutions</option>
<option value="Alden State Bank">Alden State Bank</option>
<option value="Alliant Credit Union">Alliant Credit Union</option>
<option value="Ally">Ally</option>
<option value="Allyson Hometown Mortgage">Allyson Hometown Mortgage</option>
<option value="AlRes Mortgage Solutions">AlRes Mortgage Solutions</option>
<option value="Amera Mortgage">Amera Mortgage</option>
<option value="American Financial">American Financial</option>
<option value="American Internet Mortgage Inc">American Internet Mortgage Inc</option>
<option value="American Southwest Mortgage">American Southwest Mortgage</option>
<option value="Americu Mortgage">Americu Mortgage</option>
<option value="Amerifirst Financial">Amerifirst Financial</option>
<option value="AmeriPlus Mortgage">AmeriPlus Mortgage</option>
<option value="Ameriprise Financial">Ameriprise Financial</option>
<option value="Anderson Financial">Anderson Financial</option>
<option value="Ann Arbor Bank">Ann Arbor Bank</option>
<option value="Ann Arbor Mortgage">Ann Arbor Mortgage</option>
<option value="Ann Arbor State Bank">Ann Arbor State Bank</option>
<option value="Apex Funding">Apex Funding</option>
<option value="Appex Financial Solutions">Appex Financial Solutions</option>
<option value="Approved Mortgages">Approved Mortgages</option>
<option value="Arbor Mortgage">Arbor Mortgage</option>
<option value="Aspire Lending">Aspire Lending</option>
<option value="Asset One Mortgage">Asset One Mortgage</option>
<option value="Atlantis Mortgage">Atlantis Mortgage</option>
<option value="B of I Federal Bank">B of I Federal Bank</option>
<option value="Bank of America">Bank of America</option>
<option value="Bank of Ann Arbor">Bank of Ann Arbor</option>
<option value="Bank of Michigan">Bank of Michigan</option>
<option value="Bank of Northern Michigan">Bank of Northern Michigan</option>
<option value="Bankers Home Loan">Bankers Home Loan</option>
<option value="Bankwell Mortgage">Bankwell Mortgage</option>
<option value="Bay Wind Federal CU">Bay Wind Federal CU</option>
<option value="Burns Financial">Burns Financial</option>
<option value="C4D Mortgage">C4D Mortgage</option>
<option value="Cadillac Mortgage DBA Amerifirst Financi">Cadillac Mortgage DBA Amerifirst Financi</option>
<option value="Caliber Funding">Caliber Funding</option>
<option value="Calibur Funding">Calibur Funding</option>
<option value="Cap West Mortgage">Cap West Mortgage</option>
<option value="Capital Lending Inc.">Capital Lending Inc.</option>
<option value="Capital Mortgage">Capital Mortgage</option>
<option value="Cartus Home Loans">Cartus Home Loans</option>
<option value="Cason Home Loans">Cason Home Loans</option>
<option value="CCO Mortgage">CCO Mortgage</option>
<option value="CEFCU">CEFCU</option>
<option value="Center Bank">Center Bank</option>
<option value="Century Mortgage">Century Mortgage</option>
<option value="Charlevoix State Bank">Charlevoix State Bank</option>
<option value="Charter One">Charter One</option>
<option value="Chemical Bank">Chemical Bank</option>
<option value="Christian Financial">Christian Financial</option>
<option value="Churchill Mortgage Corp">Churchill Mortgage Corp</option>
<option value="Citi Mortgage">Citi Mortgage</option>
<option value="Citibank">Citibank</option>
<option value="Citizens Bank">Citizens Bank</option>
<option value="Clearpoint Funding">Clearpoint Funding</option>
<option value="Coletaylor Mortgage">Coletaylor Mortgage</option>
<option value="Colonial Mortgage">Colonial Mortgage</option>
<option value="Comerica Bank">Comerica Bank</option>
<option value="Community Choice">Community Choice</option>
<option value="Community Financial">Community Financial</option>
<option value="Consolidated Financial Mgmt">Consolidated Financial Mgmt</option>
<option value="Construction Federal Credit Union">Construction Federal Credit Union</option>
<option value="Coop Services Credit Union">Coop Services Credit Union</option>
<option value="Cornerstone">Cornerstone</option>
<option value="Countrywide Mortgage Funding">Countrywide Mortgage Funding</option>
<option value="Credit Union One">Credit Union One</option>
<option value="Cross Country Mortgage">Cross Country Mortgage</option>
<option value="CSB Mortgage">CSB Mortgage</option>
<option value="Dearborn Federal Savings Bank">Dearborn Federal Savings Bank</option>
<option value="DFCU - Dearborn Federal Credit Union">DFCU - Dearborn Federal Credit Union</option>
<option value="Discover Home Loans">Discover Home Loans</option>
<option value="Dort Federal Credit Union">Dort Federal Credit Union</option>
<option value="Dort Federal Credit Union">Dort Federal Credit Union</option>
<option value="Dow Chemical Credit Union">Dow Chemical Credit Union</option>
<option value="Downriver Community Federal Credit Union">Downriver Community Federal Credit Union</option>
<option value="Edward Jones">Edward Jones</option>
<option value="Elga Credit Union">Elga Credit Union</option>
<option value="Elias Financial">Elias Financial</option>
<option value="Elite Mortgage">Elite Mortgage</option>
<option value="Envoy Mortgage">Envoy Mortgage</option>
<option value="Equitrust">Equitrust</option>
<option value="Exceptional Mortgage Services">Exceptional Mortgage Services</option>
<option value="Fairway Independent Mortgage">Fairway Independent Mortgage</option>
<option value="Federal Savings">Federal Savings</option>
<option value="Fifth Third Bank">Fifth Third Bank</option>
<option value="Financial Plus Credit Union">Financial Plus Credit Union</option>
<option value="First Choice Loan Services">First Choice Loan Services</option>
<option value="First Commerce Financial">First Commerce Financial</option>
<option value="First Community">First Community</option>
<option value="First Federal Bank">First Federal Bank</option>
<option value="First Merit Bank">First Merit Bank</option>
<option value="First Michigan">First Michigan</option>
<option value="First Mortgage Corp">First Mortgage Corp</option>
<option value="First National Mortgage Bankers">First National Mortgage Bankers</option>
<option value="First Place Bank">First Place Bank</option>
<option value="First Preferred">First Preferred</option>
<option value="First Republic Bank">First Republic Bank</option>
<option value="First Securities Financial Services">First Securities Financial Services</option>
<option value="First Security Mortgage">First Security Mortgage</option>
<option value="First State Bank">First State Bank</option>
<option value="Flagstar">Flagstar</option>
<option value="Fleet Financial">Fleet Financial</option>
<option value="Franklin American Mortgage">Franklin American Mortgage</option>
<option value="Front Street Mortgage">Front Street Mortgage</option>
<option value="Genisys Credit Union">Genisys Credit Union</option>
<option value="Genysis Midwest Loan Services">Genysis Midwest Loan Services</option>
<option value="GMAC">GMAC</option>
<option value="Gold Coast Bank Chicago">Gold Coast Bank Chicago</option>
<option value="Gold Star Mtg">Gold Star Mtg</option>
<option value="Good Shepherd Credit Union">Good Shepherd Credit Union</option>
<option value="Great Lakes Mortgage">Great Lakes Mortgage</option>
<option value="Great Lakes Mortgage Funding">Great Lakes Mortgage Funding</option>
<option value="Green Stone Farm Credit">Green Stone Farm Credit</option>
<option value="Greenstone Financial">Greenstone Financial</option>
<option value="Group One">Group One</option>
<option value="Guaranty Bank FSB">Guaranty Bank FSB</option>
<option value="Guardian Mortgage">Guardian Mortgage</option>
<option value="Guidance Residential">Guidance Residential</option>
<option value="Hantz Bank">Hantz Bank</option>
<option value="Harbour Mortgage">Harbour Mortgage</option>
<option value="Holly Financial">Holly Financial</option>
<option value="Home Funding Group">Home Funding Group</option>
<option value="Home Lending Solutions">Home Lending Solutions</option>
<option value="Home Loan Specialist">Home Loan Specialist</option>
<option value="Homesite Mortgage">Homesite Mortgage</option>
<option value="Homestead Mortgage">Homestead Mortgage</option>
<option value="Hometown Mortgage">Hometown Mortgage</option>
<option value="Honor Bank">Honor Bank</option>
<option value="Horizon Financial Group">Horizon Financial Group</option>
<option value="HSBC Bank">HSBC Bank</option>
<option value="Huntington Bank">Huntington Bank</option>
<option value="Huron Valley Financial">Huron Valley Financial</option>
<option value="iFreedom Direct Mortgage Services">iFreedom Direct Mortgage Services</option>
<option value="Independence Mortgage">Independence Mortgage</option>
<option value="Independent Bank">Independent Bank</option>
<option value="Independent Mortgage Co.">Independent Mortgage Co.</option>
<option value="Integra Mortgage Corp">Integra Mortgage Corp</option>
<option value="Integrity Home Loans">Integrity Home Loans</option>
<option value="Interbank Mortgage">Interbank Mortgage</option>
<option value="Intouch Credit Union">Intouch Credit Union</option>
<option value="Intouch Credit Union">Intouch Credit Union</option>
<option value="JP Morgan Chase">JP Morgan Chase</option>
<option value="Kaye Financial">Kaye Financial</option>
<option value="KEMBRA-Financial Credit Union">KEMBRA-Financial Credit Union</option>
<option value="Key Bank">Key Bank</option>
<option value="Lake Michigan Credit Union">Lake Michigan Credit Union</option>
<option value="Lakeside Mortgage">Lakeside Mortgage</option>
<option value="Level One">Level One</option>
<option value="Lighthouse Title">Lighthouse Title</option>
<option value="Livingston Community Bank">Livingston Community Bank</option>
<option value="Lotus Bank">Lotus Bank</option>
<option value="Main Street Bank">Main Street Bank</option>
<option value="Maple Mortgage">Maple Mortgage</option>
<option value="Maple Mortgage">Maple Mortgage</option>
<option value="Maroon Financial CU">Maroon Financial CU</option>
<option value="Maverick Funding">Maverick Funding</option>
<option value="Mayo Employee Fed Credit Union">Mayo Employee Fed Credit Union</option>
<option value="McLellan Financial">McLellan Financial</option>
<option value="Member First">Member First</option>
<option value="Member Mortgage Services">Member Mortgage Services</option>
<option value="Merrill Lynch">Merrill Lynch</option>
<option value="Metro Mortgage Investments LLC">Metro Mortgage Investments LLC</option>
<option value="Michigan Catholic Credit Union">Michigan Catholic Credit Union</option>
<option value="Michigan Financial Mortgage">Michigan Financial Mortgage</option>
<option value="Michigan Mutual">Michigan Mutual</option>
<option value="Michigan Schools & Government Credit Uni">Michigan Schools & Government Credit Uni</option>
<option value="Michigan United Mortgage">Michigan United Mortgage</option>
<option value="Midwest Realty Finance">Midwest Realty Finance</option>
<option value="Military Family Home Loans">Military Family Home Loans</option>
<option value="Milmar Mortgage">Milmar Mortgage</option>
<option value="Monarch Community Bank">Monarch Community Bank</option>
<option value="Monroe Bank & Trust">Monroe Bank & Trust</option>
<option value="Mortgage Capital Associates">Mortgage Capital Associates</option>
<option value="Mortgage Center">Mortgage Center</option>
<option value="Mortgage First">Mortgage First</option>
<option value="Mortgage Investors Corp">Mortgage Investors Corp</option>
<option value="Mortgage One">Mortgage One</option>
<option value="Mortgage Resources">Mortgage Resources</option>
<option value="Mortgage Services III">Mortgage Services III</option>
<option value="MSU Credit Union">MSU Credit Union</option>
<option value="Muskegon St. Joseph Federal Credit Union">Muskegon St. Joseph Federal Credit Union</option>
<option value="National Bank of Kansas">National Bank of Kansas</option>
<option value="National Funding">National Funding</option>
<option value="National Home Lending">National Home Lending</option>
<option value="Nations Direct Mortgage">Nations Direct Mortgage</option>
<option value="Nationstar Mortgage">Nationstar Mortgage</option>
<option value="Navy Federal Credit Union">Navy Federal Credit Union</option>
<option value="NCB Financial Group">NCB Financial Group</option>
<option value="New Century Mortgage Financial">New Century Mortgage Financial</option>
<option value="Northwest Federal Credit Union">Northwest Federal Credit Union</option>
<option value="Northwestern Bank">Northwestern Bank</option>
<option value="Northwestern Mortgage">Northwestern Mortgage</option>
<option value="Nucompass Mortgage">Nucompass Mortgage</option>
<option value="NYCB Mortgage Co">NYCB Mortgage Co</option>
<option value="Oakland County Credit Union">Oakland County Credit Union</option>
<option value="OTHER">OTHER</option>
<option value="PAC Federal Credit Union">PAC Federal Credit Union</option>
<option value="Pierpoint Mtg">Pierpoint Mtg</option>
<option value="PLB Lending">PLB Lending</option>
<option value="PNC Bank">PNC Bank</option>
<option value="Polaris Home Funding">Polaris Home Funding</option>
<option value="Preferred Mortgage">Preferred Mortgage</option>
<option value="Premia Mortgage">Premia Mortgage</option>
<option value="Premier Mortgage">Premier Mortgage</option>
<option value="Prime Lending">Prime Lending</option>
<option value="Provident Funding">Provident Funding</option>
<option value="Pulte Mortgage">Pulte Mortgage</option>
<option value="Quicken Loans">Quicken Loans</option>
<option value="RBS Citizens">RBS Citizens</option>
<option value="Real Estate Mortgage">Real Estate Mortgage</option>
<option value="Reliance Financial">Reliance Financial</option>
<option value="REMN">REMN</option>
<option value="Resource Mortgage">Resource Mortgage</option>
<option value="Ross Mortgage">Ross Mortgage</option>
<option value="Savage & Associates">Savage & Associates</option>
<option value="Security Mortgage Corporation">Security Mortgage Corporation</option>
<option value="Select Investors">Select Investors</option>
<option value="Sentrax">Sentrax</option>
<option value="Shelter Mortgage">Shelter Mortgage</option>
<option value="Shore Financial">Shore Financial</option>
<option value="Sierra Pacific Mortgage">Sierra Pacific Mortgage</option>
<option value="Sirva Mortgage">Sirva Mortgage</option>
<option value="Sistar Mortgage">Sistar Mortgage</option>
<option value="Somerset Lending">Somerset Lending</option>
<option value="Southwest Housing">Southwest Housing</option>
<option value="St. James Mortgage">St. James Mortgage</option>
<option value="Star Mortgage">Star Mortgage</option>
<option value="State Farm">State Farm</option>
<option value="State Savings Bank">State Savings Bank</option>
<option value="Stifel Bank & Trust">Stifel Bank & Trust</option>
<option value="Success Mortgage">Success Mortgage</option>
<option value="Summit Community Bank">Summit Community Bank</option>
<option value="Summit Funding">Summit Funding</option>
<option value="Talmer Bank and Trust">Talmer Bank and Trust</option>
<option value="TBI Mortgage">TBI Mortgage</option>
<option value="TCF Bank">TCF Bank</option>
<option value="Telcom Credit Union">Telcom Credit Union</option>
<option value="Telecom Credit Union">Telecom Credit Union</option>
<option value="TG Group">TG Group</option>
<option value="The Private Bank and Trust">The Private Bank and Trust</option>
<option value="Title Source">Title Source</option>
<option value="Top Flite Financial">Top Flite Financial</option>
<option value="Towne Mortgage Co">Towne Mortgage Co</option>
<option value="Traverse City State Bank">Traverse City State Bank</option>
<option value="Trust Financial Home Lending">Trust Financial Home Lending</option>
<option value="U of M Credit Union">U of M Credit Union</option>
<option value="UBS">UBS</option>
<option value="United Bank and Trust">United Bank and Trust</option>
<option value="United Mortgage">United Mortgage</option>
<option value="United Wholesale Mortgage">United Wholesale Mortgage</option>
<option value="Universal Lending Group">Universal Lending Group</option>
<option value="University Bank of Ann Arbor">University Bank of Ann Arbor</option>
<option value="University Lending">University Lending</option>
<option value="US Bank">US Bank</option>
<option value="US Bank National Assoc">US Bank National Assoc</option>
<option value="USAA Federal">USAA Federal</option>
<option value="USDA Rural Development">USDA Rural Development</option>
<option value="Vacation Finance">Vacation Finance</option>
<option value="Vandyk Mortgage">Vandyk Mortgage</option>
<option value="Versatile Mortgage">Versatile Mortgage</option>
<option value="Veterans United">Veterans United</option>
<option value="Vista Team">Vista Team</option>
<option value="Wall Street Lending Corp">Wall Street Lending Corp</option>
<option value="Watson Group Financial">Watson Group Financial</option>
<option value="Wells Fargo">Wells Fargo</option>
<option value="Wildfire Credit Union">Wildfire Credit Union</option>
<option value="Zana Financial">Zana Financial</option>
<option value="Zenith Mortgage">Zenith Mortgage</option>

	</select>
    </td></tr>
    <tr><td>If &quot;OTHER&quot; enter name</td>
    <td><input type="text" name="mocomp" size="25" maxlength="50"></td></tr>
    <tr><td>Does the transaction type on the 203 match the transaction type on the HUD-1?</td>
    <td><select Name="transmatch">
                                 	<option value=""></option>
<option value="Yes">Yes</option>
<option value="No">No</option></select></td></tr>
    <tr><td>If &quot;NO&quot; select the correct transaction type</td>
    <td><select name="trans_type">
                            	<option value=""></option>
                            	<option value="Bank">Bank</option>
                                <option value="HUD">HUD</option>
                                <option value="Short Sale">Short Sale</option>
                                <option value="Traditional">Traditional</option>
                                <option value="Lease">Lease</option>
                                <option value="Commercial">Commercial</option>
                                <option value="Vacant Land">Vacant Land</option>
                                <option value="New Construction">New Construction</option>
                            </select>
    </td></tr>
    <tr><td>Notes/Comments</td>
    <td><input type="text" name="comments" size="50" maxlength="500"></td></tr>
    <tr><td>Submitted By:</td><td><input type="text" name="submitby" size="20" maxlength="30"></td></tr>
    <tr><td>Email:</td><td><input type="text" name="email" size="20" maxlength="30"></td></tr>
    
    <tr><td><input type="submit" value="Send" /><input type="reset" value="Clear" /></td></tr>
</table>
</form>

Open in new window

0
Comment
Question by:jdines
6 Comments
 
LVL 18

Assisted Solution

by:Greg Alexander
Greg Alexander earned 167 total points
ID: 38841022
$state = $_POST['state']//required
$zip = $_POST['zipcode']//required

Open in new window

needs ending semicolons
$state = $_POST['state'];//required
$zip = $_POST['zipcode'];//required

Open in new window


And you need to remove the ending } after

if(!preg_match($string_exp,$submitted_by)) {
    $error_message .= 'The Submitted By Name you entered does not appear to be valid.<br />';
  }

Open in new window


The next one after that
0
 

Author Comment

by:jdines
ID: 38841071
Thanks, I corrected those errors but I am still getting the same error. I will go through to look for any additional typos.
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 166 total points
ID: 38841923
Who is your hosting company?  A 500 server error should not occur as a result of a PHP parse error.  You should be able to add these lines to the very top of your PHP script and get useful diagnostic information:

error_reporting(E_ALL);
ini_set('display_errors', TRUE);

If you add those and you do not get good information about the error, you might consider moving your site to a more professional hosting company.  I use and can recommend ChiHost.com for their great tech support.  I have also had good experiences with BlueHost, DreamHost, SliceHost, HostGator and LiquidWeb.  I have not had good experiences with GoDaddy or SiteGround.

Please post back and let us know if the errors begin to display, thanks. ~Ray
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 167 total points
ID: 38842686
He's probably on IIS without 'send errors to browser' set up.  Below is my email demo that works on Apache and IIS and on many hosts.  Save it as 'Email.php' so it can post to itself and change the $toText below to your own email address.
<?php
error_reporting(E_ALL);
ini_set('display_errors','1');

# some settings of POST vars
if (!isset($_POST['send']))  $send = ''; else $send = $_POST['send'];
if (!isset($_POST['subjectText'])) $subjectText = ''; else $subjectText = $_POST['subjectText'];
if (!isset($_POST['msgText'])) $msgText = ''; else $msgText = $_POST['msgText'];
if (!isset($_POST['ccText'])) $ccText = ''; else $ccText = $_POST['ccText'];
if (!isset($_POST['bccText'])) $bccText = ''; else $bccText = $_POST['bccText'];
if (!isset($_POST['nameText'])) $nameText = ''; else $nameText = $_POST['nameText'];
if (!isset($_POST['fromText'])) $fromText = ''; else $fromText = $_POST['fromText'];

if ($send == "") {
    $title="Test Email Page";
    $announce="---";
}
else {
	if($fromText === "") die("No name!");
  $toText="youremail@yourdomain.com";
	$title="Test Email Page";
  $announce="Your Message has been Sent!";
	$header = "From: ".$fromText."\r\n";
//	$header .= "Cc: ".$ccText."\n";
	$header .= "Reply-To : ".$fromText."\r\n";
	$header .= "Return-Path : ".$fromText."\r\n";
	$header .= "X-Mailer: PHP\r\n";
	$header .= "MIME-Version: 1.0\r\n";
	$header .= "Content-Type: text/plain; charset=iso-8859-1\r\n";
//	ini_set(sendmail_from,$fromText);  
	mail($toText, $subjectText, $msgText, $header, '-f'.$fromText);
//	ini_restore(sendmail_from);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><?php echo($title)?></title>
<style type="text/css">
<!-- 
A:link { color: #999999; }
A:visited { color: #999999; }
A:hover {color: #0099ff;}
-->
</style>
<script type="text/javascript">
<!--
function check()
{
var at=document.getElementById("fromText").value.indexOf("@");
var eml=document.getElementById("fromText").value;
var nam=document.getElementById("nameText").value;
var alerttxt="";
var submitOK="true";

if (eml.length < 5 || at == -1)
    {
    alerttxt=alerttxt+"Please enter a valid e-mail address!\r\n";
    submitOK="false"
    //return false;
    }
if (nam.length < 3)
    {
    alerttxt=alerttxt+"Please enter your name.\r\n";
    submitOK="false"
    //return false;
    }
if (submitOK=="false")
    {
    alert(alerttxt);
    return false;
    }

}
// -->
</script>
</head>

<body bgcolor="#ddeedd">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" summary="" width="580">
<tr><td align="center">

<?php
if ($send != "") {
   	echo ("To: ".$toText."<br>\r\nSubject: ".$subjectText."<br>\r\n".$msgText."<br>\r\n".$header);
		}
?>

<p><b><font color="#000000" size="5">Test Email</font></b></p>
<font size="4" color="#000000">

<form method="POST" action="Email.php" onsubmit="return check();">
    <p><font size="3"><b>Name: <input type="text" name="nameText" id="nameText" size="46"></b></font></p>
    <p><font size="3"><b>Email: <input type="text" name="fromText" id="fromText" size="46"></b></font></p>
    <input type="hidden" name="subjectText" value="Web Mail">
    <p><font face="Arial" size="3"><b>Message Text:</b></font></p>
    <p><font face="Arial" size="3"><b><textarea rows="6" name="msgText" cols="60"></textarea></b></font></p>
    <p><font size="3"><b><input type="submit" value="Send" name="send" style="font-family: Arial; font-size: 12pt; font-weight: bold"></b></font></p>
    <input type="hidden" name="state" value="1">
  </form>
  <b><font face="Arial" size="4" color="#e00000"><?php echo($announce)?></font></b><br><br>

</font>
</td></tr>
</table> 
</div>

</body>
</html>

Open in new window

0
 

Author Closing Comment

by:jdines
ID: 38861244
Thank you, this helped me to find the issue.
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 38861825
If the responses helped you find the issue, why did you give a bad grade?
http://www.experts-exchange.com/help/viewHelpPage.jsp?helpPageID=26

What were you expecting?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now