JADASDesigner Posted November 21, 2008 Share Posted November 21, 2008 It was working. then it stopped. Any ideas? <?php $EmailTo = "person@example.com"; $EmailFrom = "webmaster@example.com"; $Subject = "Online Applicant"; $Name = Trim(stripslashes($_POST['Name'])); $Address = Trim(stripslashes($_POST['Address'])); $City = Trim(stripslashes($_POST['City'])); $State = Trim(stripslashes($_POST['State'])); $PostCode = Trim(stripslashes($_POST['PostCode'])); $HomeTel = Trim(stripslashes($_POST['HomeTel'])); $Mobile = Trim(stripslashes($_POST['Mobile'])); $DateEligible = Trim(stripslashes($_POST['DateEligible'])); $Position = Trim(stripslashes($_POST['Position'])); $SSN = Trim(stripslashes($_POST['SSN'])); $DL = Trim(stripslashes($_POST['DL'])); $Salary = Trim(stripslashes($_POST['Salary'])); $ProfessionalLiscense = Trim(stripslashes($_POST['ProfessionalLiscense'])); $MaritalStatus = Trim(stripslashes($_POST['MaritalStatus'])); $Health = Trim(stripslashes($_POST['Health'])); $Prior = Trim(stripslashes($_POST['Prior'])); $TypeOfEmployment = Trim(stripslashes($_POST['TypeOfEmployment'])); $Criminal = Trim(stripslashes($_POST['Criminal'])); $typeofcriminal = Trim(stripslashes($_POST['typeofcriminal'])); $Highschool = Trim(stripslashes($_POST['Highschool'])); $HSGradYear = Trim(stripslashes($_POST['HSGradYear'])); $HSAddress = Trim(stripslashes($_POST['HSAddress'])); $HSDegree = Trim(stripslashes($_POST['HSDegree'])); $HSYearsCompleted = Trim(stripslashes($_POST['HSYearsCompleted'])); $College1 = Trim(stripslashes($_POST['College1'])); $C1GradYear = Trim(stripslashes($_POST['C1GradYear'])); $C1Address = Trim(stripslashes($_POST['C1Address'])); $C1Degree = Trim(stripslashes($_POST['C1Degree'])); $C1YearsCompleted = Trim(stripslashes($_POST['C1YearsCompleted'])); $College2 = Trim(stripslashes($_POST['College2'])); $C2GradYear = Trim(stripslashes($_POST['C2GradYear'])); $C2Address = Trim(stripslashes($_POST['C2Address'])); $C2Degree = Trim(stripslashes($_POST['C2Degree'])); $C2YearsCompleted = Trim(stripslashes($_POST['C2YearsCompleted'])); $employmentdates1 = Trim(stripslashes($_POST['employmentdates1'])); $position1 = Trim(stripslashes($_POST['position1'])); $company1 = Trim(stripslashes($_POST['company1'])); $address1 = Trim(stripslashes($_POST['address1'])); $telephone1 = Trim(stripslashes($_POST['telephone1'])); $superviser1 = Trim(stripslashes($_POST['superviser1'])); $reason1 = Trim(stripslashes($_POST['reason1'])); $endingsalary1 = Trim(stripslashes($_POST['endingsalary1'])); $responsibilities1 = Trim(stripslashes($_POST['responsibilities1'])); $contact1 = Trim(stripslashes($_POST['contact1'])); $employmentdates2 = Trim(stripslashes($_POST['employmentdates2'])); $position2 = Trim(stripslashes($_POST['position2'])); $company2 = Trim(stripslashes($_POST['company2'])); $address2 = Trim(stripslashes($_POST['address2'])); $telephone2 = Trim(stripslashes($_POST['telephone2'])); $superviser2 = Trim(stripslashes($_POST['superviser2'])); $reason2 = Trim(stripslashes($_POST['reason2'])); $endingsalary2 = Trim(stripslashes($_POST['endingsalary2'])); $responsibilities2 = Trim(stripslashes($_POST['responsibilities2'])); $contact2 = Trim(stripslashes($_POST['contact2'])); $employmentdates3 = Trim(stripslashes($_POST['employmentdates3'])); $position3 = Trim(stripslashes($_POST['position3'])); $company3 = Trim(stripslashes($_POST['company3'])); $address3 = Trim(stripslashes($_POST['address3'])); $telephone3 = Trim(stripslashes($_POST['telephone3'])); $superviser3 = Trim(stripslashes($_POST['superviser3'])); $reason3 = Trim(stripslashes($_POST['reason3'])); $endingsalary3 = Trim(stripslashes($_POST['endingsalary3'])); $responsibilities3 = Trim(stripslashes($_POST['responsibilities3'])); $contact3 = Trim(stripslashes($_POST['contact3'])); $skills = Trim(stripslashes($_POST['skills'])); $refname1 = Trim(stripslashes($_POST['refname1'])); $refphone1 = Trim(stripslashes($_POST['refphone1'])); $refaddress1 = Trim(stripslashes($_POST['refaddress1'])); $refcity1 = Trim(stripslashes($_POST['refcity1'])); $refstate1 = Trim(stripslashes($_POST['refstate1'])); $refzip1 = Trim(stripslashes($_POST['refzip1'])); $refname2 = Trim(stripslashes($_POST['refname2'])); $refphone2 = Trim(stripslashes($_POST['refphone2'])); $refaddress2 = Trim(stripslashes($_POST['refaddress2'])); $refcity2 = Trim(stripslashes($_POST['refcity2'])); $refstate2 = Trim(stripslashes($_POST['refstate2'])); $refzip2 = Trim(stripslashes($_POST['refzip2'])); $refname3 = Trim(stripslashes($_POST['refname3'])); $refphone3 = Trim(stripslashes($_POST['refphone3'])); $refaddress3 = Trim(stripslashes($_POST['refaddress3'])); $refcity3 = Trim(stripslashes($_POST['refcity3'])); $refstate3 = Trim(stripslashes($_POST['refstate3'])); $refzip3 = Trim(stripslashes($_POST['refzip3'])); $signature = Trim(stripslashes($_POST['signature'])); // validation $validationOK=true; if (Trim($Name)=="") $validationOK=false; if (Trim($Address)=="") $validationOK=false; if (Trim($City)=="") $validationOK=false; if (Trim($State)=="") $validationOK=false; if (Trim($PostCode)=="") $validationOK=false; if (Trim($HomeTel)=="") $validationOK=false; if (Trim($SSN)=="") $validationOK=false; if (Trim($DL)=="") $validationOK=false; if (Trim($signature)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; exit; // prepare email body text $Body = ""; $Body .= $Name."\n"; $Body .= $Address."\n"; $Body .= $City; $Body .= ", "; $Body .= $State; $Body .= " "; $Body .= $PostCode."\n"; $Body .= "------------------------------------------------------------\n"; $Body .= "SSN: "; $Body .= $SSN; $Body .= "DL: "; $Body .= " - "; $Body .= $DL; $Body .= "\n"; $Body .= "\n"; $Body .= "Home: "; $Body .= $HomeTel; $Body .= " - "; $Body .= "Mobile: "; $Body .= $Mobile; $Body .= "\n"; $Body .= "\n"; $Body .= "Eligible for Employment: "; $Body .= $DateEligible; $Body .= " - "; $Body .= "Position Desired: "; $Body .= $Position; $Body .= " - "; $Body .= "Salary Desired: "; $Body .= $Salary; $Body .= "\n"; $Body .= "Type of Employment: "; $Body .= $TypeOfEmployment; $Body .= " - "; $Body .= "Professional Liscense: "; $Body .= $ProfessionalLiscense; $Body .= "\n"; $Body .= "\n"; $Body .= "Marital Status: "; $Body .= $MaritalStatus; $Body .= "\n"; $Body .= "\n"; $Body .= "Have you ever pled \"Guilty/No Contest\" to, or been convicted of a crime? "; $Body .= $Criminal; $Body .= "\n"; $Body .= $typeofcriminal; $Body .= "\n"; $Body .= "\n"; $Body .= "Education-"; $Body .= "\n"; $Body .= "Highschool: \n"; $Body .= $Highschool; $Body .= " - Graduated: "; $Body .= $HSGradYear; $Body .= "\n"; $Body .= $HSAddress; $Body .= "\n"; $Body .= "Diploma: "; $Body .= $HSDegree; $Body .= " - Years Completed: "; $Body .= $HSYearsCompleted; $Body .= "\n"; $Body .= "\n"; $Body .= "College: \n"; $Body .= $College1; $Body .= " - Graduated: "; $Body .= $C1GradYear; $Body .= "\n"; $Body .= $C1Address; $Body .= "\n"; $Body .= "Degree: "; $Body .= $C1Degree; $Body .= " - Years Completed: "; $Body .= $C1YearsCompleted; $Body .= "\n"; $Body .= "\n"; $Body .= "College: \n"; $Body .= $College2; $Body .= " - Graduated: "; $Body .= $C2GradYear; $Body .= "\n"; $Body .= $C2Address; $Body .= "\n"; $Body .= "Degree: "; $Body .= $C2Degree; $Body .= " - Years Completed: "; $Body .= $C2YearsCompleted; $Body .= "\n"; $Body .= "\n"; $Body .= "Previous Employment-"; $Body .= "\n"; $Body .= "Dates of Employment: "; $Body .= $employmentdates1; $Body .= " - Comapny: "; $Body .= $company1; $Body .= " - Position: "; $Body .= $position1; $Body .= "\n"; $Body .= "Address: "; $Body .= $address1; $Body .= " - Telephone: "; $Body .= $telephone1; $Body .= "\n"; $Body .= "Supervisor: "; $Body .= $superviser1; $Body .= "\n"; $Body .= "Reason for Leaving: "; $Body .= $reason1; $Body .= "\n"; $Body .= "Ending Salary: "; $Body .= $endingsalary1; $Body .= "\n"; $Body .= "Responsibilities: "; $Body .= $responsibilities1; $Body .= "\n"; $Body .= "Can we contact this employer?: "; $Body .= $contact1; $Body .= "\n"; $Body .= "\n"; $Body .= "Dates of Employment: "; $Body .= $employmentdates2; $Body .= " - Comapny: "; $Body .= $company2; $Body .= " - Position: "; $Body .= $position2; $Body .= "\n"; $Body .= "Address: "; $Body .= $address2; $Body .= " - Telephone: "; $Body .= $telephone2; $Body .= "\n"; $Body .= "Supervisor: "; $Body .= $superviser2; $Body .= "\n"; $Body .= "Reason for Leaving: "; $Body .= $reason2; $Body .= "\n"; $Body .= "Ending Salary: "; $Body .= $endingsalary2; $Body .= "\n"; $Body .= "Responsibilities: "; $Body .= $responsibilities2; $Body .= "\n"; $Body .= "Can we contact this employer?: "; $Body .= $contact2; $Body .= "\n"; $Body .= "\n"; $Body .= "Dates of Employment: "; $Body .= $employmentdates3; $Body .= " - Comapny: "; $Body .= $company3; $Body .= " - Position: "; $Body .= $position3; $Body .= "\n"; $Body .= "Address: "; $Body .= $address3; $Body .= " - Telephone: "; $Body .= $telephone3; $Body .= "\n"; $Body .= "Supervisor: "; $Body .= $superviser3; $Body .= "\n"; $Body .= "Reason for Leaving: "; $Body .= $reason3; $Body .= "\n"; $Body .= "Ending Salary: "; $Body .= $endingsalary3; $Body .= "\n"; $Body .= "Responsibilities: "; $Body .= $responsibilities3; $Body .= "\n"; $Body .= "Can we contact this employer?: "; $Body .= $contact3; $Body .= "\n"; $Body .= "\n"; $Body .= "Skills: "; $Body .= $skills; $Body .= "\n"; $Body .= "\n"; $Body .= "Refferals-"; $Body .= "\n"; $Body .= $refname1; $Body .= "\n"; $Body .= $refphone1; $Body .= "\n"; $Body .= $refaddress1; $Body .= "\n"; $Body .= $refcity1; $Body .= ", "; $Body .= $refstate1; $Body .= " "; $Body .= $refzip1; $Body .= "\n"; $Body .= "\n"; $Body .= "Digital Signature: "; $Body .= $signature; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/133600-unexpected-end/ Share on other sites More sharing options...
gevans Posted November 21, 2008 Share Posted November 21, 2008 It would've helped if you put the error in your post, but this is the problem; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; exit; should be if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; exit; } Quote Link to comment https://forums.phpfreaks.com/topic/133600-unexpected-end/#findComment-694989 Share on other sites More sharing options...
Maq Posted November 21, 2008 Share Posted November 21, 2008 Is this all the code? If so, you don't close this IF STATEMENT. if (!$validationOK) { Quote Link to comment https://forums.phpfreaks.com/topic/133600-unexpected-end/#findComment-694990 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.