kpetsche20 Posted February 27, 2008 Share Posted February 27, 2008 I made a PHP form, when it is submitted it sends me a blank email and sometimes nothing at all. I included the code below. The for is located at http://webmasterfreehost.com/loan/new.html <? $LoanType = $_POST['LoanType']; $LoanAmount = $_POST['LoanAmount']; $LoanRate = $_POST['LoanRate']; $LoanMos = $_POST['LoanMos']; $LoanAmort = $_POST['LoanAmort']; $PropCity = $_POST['PropCity']; $PropZip = $_POST['PropZip']; $PropUnits = $_POST['PropUnits']; $PropPurpose = $_POST['PropPurpose']; $PropCode = $_POST['PropCode']; $PropValue = $_POST['PropValue']; $PropDown = $_POST['PropDown']; $PropLiens = $_POST['PropLiens']; $PropRefi = $_POST['PropRefi']; $BFirstName = $_POST['BFirstName']; $BMI = $_POST['BMI']; $BLastName = $_POST['BLastName']; $BSuf = $_POST['BSuf']; $BCCR = $_POST['BCCR']; ///social security $BSSN1 = $_POST['BSSN1']; $BSSN2 = $_POST['BSSN2']; $BSSN3 = $_POST['BSSN3']; $BDOB = $_POST['BDOB']; ///Evening Phone $BPh1 = $_POST['BPh1']; $BPh2 = $_POST['BPh2']; $BPh3 = $_POST['BPh3']; $BMar = $_POST['BMar']; $BDep = $_POST['BDep']; $BEmail = $_POST['BEmail']; $BAddr = $_POST['BAddr']; $BCity = $_POST['BCity']; $BState = $_POST['BState']; $BZip = $_POST['BZip']; $BCode = $_POST['BCode']; //how long at address $BYears = $_POST['BYears']; $BMos = $_POST['BMos']; $CFirstName = $_POST['CFirstName']; $CMI = $_POST['CMI']; $CLastName = $_POST['CLastName']; $CSuf = $_POST['CSuf']; $CCCR = $_POST['CCCR']; //social security # $CSSN1 = $_POST['CSSN1']; $CSSN2 = $_POST['CSSN2']; $CSSN3 = $_POST['CSSN3']; $CDOB = $_POST['CDOB']; //evening phone $CPh1 = $_POST['CPh1']; $CPh2 = $_POST['CPh2']; $CPh3 = $_POST['CPh3']; $CMar = $_POST['CMar']; $CDep = $_POST['CDep']; $CCSame = $_POST['CCSame']; $CAddr = $_POST['CAddr']; $CCity = $_POST['CCity']; $CState = $_POST['CState']; $CZip = $_POST['CZip']; $CCode = $_POST['CCode']; //how long at address $CYears = $_POST['CYears']; $CMos = $_POST['CMos']; $CFSame = $_POST['CFSame']; $CFAddr = $_POST['CFAddr']; $CFCity = $_POST['CFCity']; $CFState = $_POST['CFState']; $CFZip = $_POST['CFZip']; $CFCode = $_POST['CFCode']; //long long at address $CFYears = $_POST['CFYears']; $CFMos = $_POST['CFMos']; $BEmpName = $_POST['BEmpName']; $BCSelf = $_POST['BCSelf']; //time on job $BEmpYears = $_POST['BEmpYears']; $BEmpMos = $_POST['BEmpMos']; $CEmpName = $_POST['CEmpName']; $CCSelf = $_POST['CCSelf']; //how long on job $CEmpYears = $_POST['CEmpYears']; $CEmpMos = $_POST['CEmpMos']; $B1CSec = $_POST['B1CSec']; $B1PEName = $_POST['B1PEName']; $B1CPESelf = $_POST['B1CPESelf']; //stat moth year $B1PEStartMo = $_POST['B1PEStartMo']; $B1PEStartYr = $_POST['B1PEStartYr']; //end month year $B1PEEndMo = $_POST['B1PEEndMo']; $B1PEEndYr = $_POST['B1PEEndYr']; $C1CSec = $_POST['C1CSec']; $C1PEName = $_POST['C1PEName']; $C1CPESelf = $_POST['C1CPESelf']; //start month $C1PEStartMo = $_POST['C1PEStartMo']; $C1PEStartYr = $_POST['C1PEStartYr']; //endmonth $C1PEEndMo = $_POST['C1PEEndMo']; $C1PEEndYr = $_POST['C1PEEndYr']; $B2CSec = $_POST['B1CSec']; $B2PEName = $_POST['B2PEName']; $B2CPESelf = $_POST['B2CPESelf']; //name //stat moth year $B2PEStartMo = $_POST['B2PEStartMo']; $B2PEStartYr = $_POST['B2PEStartYr']; //end month year $B2PEEndMo = $_POST['B2PEEndMo']; $B2PEEndYr = $_POST['B2PEEndYr']; $C2CSec = $_POST['C2CSec']; $C2PEName2 = $_POST['C2PEName2']; $C2CPESelf = $_POST['C2CPESelf']; //start month $C2PEStartMo = $_POST['C2PEStartMo']; $C2PEStartYr = $_POST['C2PEStartYr']; //endmonth $C2PEEndMo = $_POST['C2PEEndMo']; $C2PEEndYr = $_POST['C2PEEndYr']; $BBase = $_POST['BBase']; $BOver = $_POST['BOver']; $BBonus = $_POST['BBonus']; $BComm = $_POST['BComm']; $BDivid = $_POST['BDivid']; $CBase = $_POST['CBase']; $COver = $_POST['COver']; $CBonus = $_POST['CBonus']; $CComm = $_POST['CComm']; $CDivid = $_POST['CDivid']; $Owner1 = $_POST['Owner1']; $Owner2 = $_POST['Owner2']; $Owner3 = $_POST['Owner3']; $Desc1 = $_POST['Desc1']; $Desc2 = $_POST['Desc2']; $Desc3 = $_POST['Desc3']; $Rent = $_POST['Rent']; $FirstPI = $_POST['FirstPI']; $OtherPI = $_POST['OtherPI']; $Hazard = $_POST['Hazard']; $RETax = $_POST['RETax']; $MtgIns = $_POST['MtgIns']; $HOIns = $_POST['HOIns']; $OtherExp = $_POST['OtherExp']; $RETaxP = $_POST['RETaxP']; $CFState = $_POST['HOInsP']; $A1Type = $_POST['A1Type']; $A1Cash = $_POST['A1Cash']; $A2Type = $_POST['A2Type']; $A2Cash = $_POST['A2Cash']; $A3Type = $_POST['A3Type']; $A3Cash = $_POST['A3Cash']; $A4Type = $_POST['A4Type']; $A4Desc = $_POST['A4Desc']; $A4Cash = $_POST['A4Cash']; $A5Type = $_POST['A5Type']; $A5Desc = $_POST['A5Desc']; $A5Cash = $_POST['A5Cash']; $A6Type = $_POST['A6Type']; $A6Desc = $_POST['A6Desc']; $A6Cash = $_POST['A6Cash']; $PType1 = $_POST['PType1']; $PDisp1 = $_POST['PDisp1']; $PAddr1 = $_POST['PAddr1']; $PCity1 = $_POST['PCity1']; $PState1 = $_POST['PState1']; $PZip1 = $_POST['PZip1']; $Present1 = $_POST['Present1']; $Gross1 = $_POST['Gross1']; $Misc1 = $_POST['Misc1']; $PType2 = $_POST['PType2']; $PDisp2 = $_POST['PDisp2']; $PAddr2 = $_POST['PAddr2']; $PCity2 = $_POST['PCity2']; $PState2 = $_POST['PState2']; $PZip2 = $_POST['PZip2']; $Present2 = $_POST['Present2']; $Gross2 = $_POST['Gross2']; $Misc2 = $_POST['Misc2']; $PType3 = $_POST['PType3']; $PDisp3 = $_POST['PDisp3']; $PAddr3 = $_POST['PAddr3']; $PCity3 = $_POST['PCity3']; $PState3 = $_POST['PState3']; $PZip3 = $_POST['PZip3']; $Present3 = $_POST['Present3']; $Gross3 = $_POST['Gross3']; $Misc3 = $_POST['Misc3']; $CFState = $_POST['CFState']; $CFState = $_POST['CFState']; $CFState = $_POST['CFState']; $body = " TYPES OF MORTGAGE AND TERMS OF LOAN Mortgage Applied for: $LoanType Loan Amount: $LoanAmount Interest Rate: $LoanRate No. of Months: $LoanMos: Amortization Type: $LoanAmort PROPERTY INFORMATION AND PURPOSE OF LOAD City: $PropCity ZIP Code: $PropZip Number of Units: $PropUnits Purpose of Loan: $PropPurpose Property Will Be: $PropCode Purchase Price or Estimated Value: $PropValue Source of Down Payment, Settlement Charges, and/or Subordinate Financing: $PropDown Existing Liens: (Amount) $PropLiens Purpose of Refinance: $PropRefi BORROWER INFORMATION First Name: $BFirstName Middle Initial: $BMI Last Name: $BLastName Generation Suffix (if applicable): $BSuf You may check my credit report at this time: (If nothing is checked, nothing will appear here) $BCCR Social Security Number: $BSSN1 - $BSSN2 - $BSSN3 Date of Birth: $BDOB Evening Phone: ($BPh1) $BPh2 $BPh3 Marital Status: $BMar Number of Dependents: $BDep PRESENT ADDRESS Email Address: $BEmail Street: $BAddr City: $BCity State: $BState ZIP Code: $BZip Rent or Own? $BCode How Long at Address: Years $BYears Months $BMos FORMER ADDRESS Street: $BFAddr City: $BFCity State: $BFState ZIP Code: $BFZip Rent or Own? $BFCode How Long at Address: Years $BFYears Months $BFMos CO-BORROWER INFORMATION First Name: $CFirstName Middle Initial: $CMI Last Name: $CLastName Generation Suffix (if applicable): You may check my credit report at this time: (If nothing is checked, nothing will appear here) $CCCR Social Security Number: $CSSN1 - $CSSN2 - $CSSN3 Date of Birth: $CDOB Evening Phone: ($CPh1) CPh2 - CPh3 Marital Status: $CMar Number of Dependents: $CDep PRESENT ADDRESS Same as barrower (if nothitng shows up here, checkbox was not selected) $CCSame Street: $CAddr City: $CCity State: $CState ZIP Code: $CZip Rent or Own? $CCode How Long at Address: Years $CYears Months $CMos FORMER ADDRESS Same as borrower: (if nothitng shows up here, checkbox was not selected) $CFSame Street: $CFAddr City: $CFCity State: $CFState ZIP Code: $CFZip Rent or Own? CFCode How Long at Address: Years $CFYears Months $CFMos EMPLOYMENT INFORMATION Employer Name: $BEmpName Self-employed: $BCSelf Time on Job: Years $BEmpYears Months $BEmpMos PREVIOUS EMPLOYMENT Secondary Current Employer: $B1CSec Employer Name: $B1PEName Self-employed: $B1CPESelf Start Mo/Year: Month $B1PEStartMo Year $B1PEStartYr End Mo/Year: Month $B1PEEndMo Year B1PEEndYr Secondary Current Employer: $B2CSec Employer Name: $B2PEName Self-employed: $B2CPESelf Start Mo/Year: Month $B2PEStartMo Year $B2PEStartYr End Mo/Year: Month $B2PEEndMo Year B2PEEndYr CO BORROWER INFORMATION Employer Name: $CEmpName Self-employed: $CCSelf Time on Job: Years $CEmpYears Months $CEmpMos PREVIOUS EMPLOYMENT Secondary Current Employer: $C1CSec Employer Name: $C1PEName Self-employed: $C1CPESelf Start Mo/Year: Month $B1PEStartMo Year $C1PEStartYr End Mo/Year: Month $C1PEEndMo Year $C1PEEndYr Secondary Current Employer: $C2CSec Employer Name: $C2PEName2 Self-employed: $C2CPESelf Start Mo/Year: Month $C2PEStartMo Year $C2PEStartYr End Mo/Year: Month $C2PEEndMo Year $C2PEEndYr GROSS MONTHLY INCOME Base Empl. Income: $BBase Overtime: $BOver Bonuses: $BBonus Commissions: $BComm Dividends/Interest: $BDivid GROSS MONTHLY INCOME CO BORROWER Base Empl. Income: $CBase Overtime: $COver Bonuses: $CBonus Commissions: $CComm Dividends + Interest: $CDivid OTHER INCOME Owner: $Owner1 Description: $Desc1 Monthly Amount: $MoAmt2 Owner: $Owner2 Description: $Desc2 Monthly Amount: $MoAmt2 Owner: $Owner3 Description: $Desc3 Monthly Amount: $MoAmt2 COMBINED MONTHLY HOUSING EXPENSES Rent: $Rent First Mortgage (P&I): $FirstPI Other Financing (P&I): $OtherPI Hazard Insurance: $Hazard Real Estate Taxes: $RETax Proposed Loan: $RETaxP Mortgage Insurance: $MtgIns Homeowner Assn. Dues: $HOIns Proposed Load: $HOInsP Other: $OtherExp ASSETS INCLUDING CHECKING AND SAVINGS Asset Type: $A1Type Cash or Market $A1Cash: Asset Type: $A2Type Cash or Market $A2Cash: Asset Type: $A3Type Cash or Market Value: $A3Cash STOCKS AND BONDS Asset Type: $A4Type Description: A4Desc Cash or Market Value: $A4Cash Asset Type: $A5Type Description: A5Desc Cash or Market Value: $A5Cash Asset Type: $A6Type Description: $A6Desc Cash or Market Value: $A6Cash SCHEDULE OF REAL ESTATE OWNED Property Type: $PType1 Property Disposition: $PDisp1 Property Street: $PAddr1 Property City: $PCity1 Property State: $PState1 Property ZIP Code: PZip1 Present Market Value: $Present1 Gross Rental Income: $Gross1 Insurance, Maint., Misc.: $Misc1 Property Type: $PType2 Property Disposition: $PDisp2 Property Street: $PAddr2 Property City: $PCity2 Property State: $PState2 Property ZIP Code: PZip2 Present Market Value: $Present2 Gross Rental Income: $Gross2 Insurance, Maint., Misc.: $Misc2 Property Type: $PType3 Property Disposition: $PDisp3 Property Street: $PAddr3 Property City: $PCity3 Property State: $PState3 Property ZIP Code: PZip3 Present Market Value: $Present3 Gross Rental Income: $Gross3 Insurance, Maint., Misc.: $Misc3 DECLARATIONS Are there any outstanding judgments against you? Borrower $BDeclA $BDeclAno Co-Borrower $CDeclA $CDeclAno Have you been declared bankrupt within the last seven years? Borrower $BDeclB $BDeclBno Co-Borrower $CDeclB $CDeclBno Have you had property foreclosed upon or given title or deed in lieu thereof in the last seven years? Borrower $BDeclC $BDeclCno Co-Borrower $CDeclC $CDeclCno Are you a party to a lawsuit? Borrower $BDeclD $BDeclDno Co-Borrower $CDeclD $CDeclDno Have you directly or indirectly been obligated on any loan which resulted in foreclosure, transfer of title in lieu of foreclosure, or judgment? Borrower $BDeclE $BDeclEno Co-Borrower $CDeclE $CDeclEno Are you presently delinquent or in default on any federal debt or any other loan, mortgage, financial obligation, bond, or loan guarantee? Borrower $BDeclF $BDeclFno Co-Borrower $CDeclF $CDeclFno Are you obligated to pay alimony, child support, or separate maintenance? Borrower $BDeclG $BDeclGno Co-Borrower $CDeclG $CDeclGno Is any part of the down payment borrowed? Borrower $BDeclH $BDeclHno Co-Borrower $CDeclH $CDeclHno Are you a co-maker or endorser on a note? Borrower $BDeclI $BDeclIno Co- Borrower $CDeclI $CDeclIno Are you a U.S. citizen? Borrower $BDeclJ $BDeclJno Co-Borrower $CDeclJ $CDeclJno Are you a permanent resident alien? Borrower $BDeclK $BDeclKno Co-Borrower $CDeclK $CDeclKno Do you intend to occupy the property as your primary residence? Borrower $BDeclL $BDeclLno Co-Borrower $CDeclL $CDeclLno Have you had an ownership interest in a property in the last three years? Borrower $BDeclM $BDeclMno Co-Borrower $CDeclM $CDeclMno 1. What type of property did you own? Borrower $BType Co-Borrower $CType 2. How did you hold title to the home? Borrower $BTitle Co-Borrower $CTitle If you answered yes to any questions A through I above, explain in the box below: $DeclComment INFORMATION FOR GOVERNMENT MONITORING PURPOSES I do not wish to furnish this information: $BCInfo Ethnicity: $BEthn Race: $BRace Sex: $BGender $BGender2 CO-BORROWER I do not wish to furnish this information: $CCInfo Ethnicity: $CEthn Race: $CRace Sex: $CGender $CGender2 "; $to = "[email protected]"; $subject = 'title'; $headers = "From: "."[email protected]"."\r\n"; $headers .= "To: ".$to."\r\n"; $mailit = mail($to,$subject,$message,$headers); // Mail it mail($to, $subject, $body, $headers); echo "thankyou.php"; ?> Link to comment https://forums.phpfreaks.com/topic/93373-php-form-not-sending-to-email-address/ Share on other sites More sharing options...
sKunKbad Posted February 27, 2008 Share Posted February 27, 2008 why this line: $mailit = mail($to,$subject,$message,$headers); $message has no value. For $body, change $body to equal 'test body' and see if it goes through. $body = 'test body'; Link to comment https://forums.phpfreaks.com/topic/93373-php-form-not-sending-to-email-address/#findComment-478314 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.