Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8227809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:15:10+00:00 2026-06-07T16:15:10+00:00

<?php $error_msgs = array (); $error = 0; if ($_POST[‘first_name’]){ $first_name = $_POST[‘first_name’]; }

  • 0
<?php

$error_msgs = array ();
$error = 0; 

if ($_POST['first_name']){
$first_name = $_POST['first_name'];
} else {
$error_msgs[] = "Please enter your first name";
$errors++; 
}

if ($_POST['last_name']){
$last_name = $_POST['last_name'];
} else {
$error_msgs[] = "Please enter your last name";
$errors++; 
}

if ($_POST['ssn']){
$ssn = $_POST['ssn'];
} else {
$error_msgs[] = "Please enter your 9 digit social security number";
$errors++; 
}

if ($_POST['phone']){
$phone = $_POST['phone'];
} else {
$error_msgs[] = "Please enter your phone number";
$errors++; 
}

if ($_POST['address']){
$address = $_POST['address'];
} else {
$error_msgs[] = "Please enter your address";
$errors++; 
}

if ($_POST['city']){
$city = $_POST['city'];
} else {
$error_msgs[] = "Please enter your city";
$errors++; 
}

if ($_POST['state']){
$state = $_POST['state'];
} else {
$error_msgs[] = "Please select your state";
$errors++; 
}

if ($_POST['zip']){
$zip = $_POST['zip'];
} else {
$error_msgs[] = "Please enter your 5 digit zip code";
$errors++; 
}

if ($_POST['position']){
$position = $_POST['position'];
} else {
$error_msgs[] = "Please enter position desired, or type N/A if open for discussion";
$errors++; 
}

if ($_POST['wage']){
$wage = $_POST['wage'];
} else {
$error_msgs[] = "Please enter 0.00 if open for discussion";
$errors++; 
}

if ($_POST['Emergencycontactname']){
$Emergencycontactname = $_POST['Emergencycontactname'];
} else {
$error_msgs[] = "Please enter your emergency contact's name";
$errors++; 
}

if ($_POST['Emergencycontactaddress']){
$Emergencycontactaddress = $_POST['Emergencycontactaddress'];
} else {
$error_msgs[] = "Please enter your emergency contact's address";
$errors++; 
}

if ($_POST['Emergencycontactcity']){
$Emergencycontactcity = $_POST['Emergencycontactcity'];
} else {
$error_msgs[] = "Please enter your emergency contact's city";
$errors++; 
}

if ($_POST['Emergencycontactstate']){
$Emergencycontactstate = $_POST['Emergencycontactstate'];
} else {
$error_msgs[] = "Please select your emergency contact's state";
$errors++; 
}

if ($_POST['Emergencycontactzip']){
$Emergencycontactzip = $_POST['Emergencycontactzip'];
} else {
$error_msgs[] = "Please enter your emergency contact's 5 digit zip code";
$errors++; 
}

if ($_POST['Emergencycontactphone']){
$Emergencycontactphone = $_POST['Emergencycontactphone'];
} else {
$error_msgs[] = "Please enter your emergency contact's phone number";
$errors++; 
}

if ($_POST['highest']){
$highest = $_POST['highest'];
} else {
$error_msgs[] = "Please enter your highest level of education";
$errors++; 
}

if ($_POST['degree']){
$degree = $_POST['degree'];
} else {
$error_msgs[] = "Please enter N/A if none";
$errors++; 
}

if ($_POST['age']){
$age = $_POST['age'];
} else {
$error_msgs[] = "Please enter yes or no";
$errors++; 
}

if ($_POST['problems']){
$problems = $_POST['problems'];
} else {
$error_msgs[] = "Please enter yes or no";
$errors++; 
}

if ($_POST['shiftwork']){
$shiftwork = $_POST['shiftwork'];
} else {
$error_msgs[] = "Please enter yes or no";
$errors++; 
}

if ($_POST['apprenticeship']){
$apprenticeship = $_POST['apprenticeship'];
} else {
$error_msgs[] = "Please enter yes or no";
$errors++; 
}

if ($_POST['disabilities']){
$disabilities = $_POST['disabilities'];
} else {
$error_msgs[] = "Please enter yes or no";
$errors++; 
}

if ($_POST['ifyes']){
$ifyes = $_POST['ifyes'];
} else {
$error_msgs[] = "If you answered no to above question, type N/A";
$errors++; 
}

if ($_POST['accommodate']){
$accommodate = $_POST['accommodate'];
} else {
$error_msgs[] = "Type N/A if you answered N/A for above question";
$errors++; 
}

if ($_POST['experience']){
$experience = $_POST['experience'];
} else {
$error_msgs[] = "Please enter yes or no";
$errors++; 
}

if ($_POST['ifyes2']){
$ifyes2 = $_POST['ifyes2'];
} else {
$error_msgs[] = "If you answered no to above, type N/A, otherwise describe";
$errors++; 
}

if ($_POST['cname']){
$cname = $_POST['cname'];
} else {
$error_msgs[] = "Please enter company name";
$errors++; 
}

if ($_POST['caddress']){
$caddress = $_POST['caddress'];
} else {
$error_msgs[] = "Please enter company address";
$errors++; 
}

if ($_POST['cphone']){
$cphone = $_POST['cphone'];
} else {
$error_msgs[] = "Please enter company phone number";
$errors++; 
}

if ($_POST['ccperson']){
$ccperson = $_POST['ccperson'];
} else {
$error_msgs[] = "Please enter company contact person's name";
$errors++; 
}

if ($_POST['ctype']){
$ctype = $_POST['ctype'];
} else {
$error_msgs[] = "Please enter type of work";
$errors++; 
}

if ($_POST['cwage']){
$cwage = $_POST['cwage'];
} else {
$error_msgs[] = "Please enter wage earned";
$errors++; 
}

if ($_POST['cstart']){
$cstart = $POST['cstart'];
} else {
$error_msgs[] = "Please enter date started";
$errors++; 
}

if ($_POST['cend']){
$cend = $POST['cend'];
} else {
$error_msgs[] = "Please enter date ended";
$errors++; 
}

if ($_POST['reason']){
$reason = $_POST['reason'];
} else {
$error_msgs[] = "Please enter reason for leaving";
$errors++; 
}

if ($_POST['cname2']){
$cname2 = $_POST['cname2'];
} else {
$error_msgs[] = "Please enter company name or type N/A";
$errors++; 
}

if ($_POST['caddress2']){
$caddress2 = $_POST['caddress2'];
} else {
$error_msgs[] = "Please enter company address or type N/A";
$errors++; 
}

if ($_POST['cphone2']){
$cphone2 = $_POST['cphone2'];
} else {
 $error_msgs[] = "Please enter company phone number or type N/A";
$errors++; 
}

if ($_POST['ccperson2']){
$ccperson2 = $_POST['ccperson2'];
} else {
$error_msgs[] = "Please enter company contact person's name or type N/A";
$errors++; 
}

if ($_POST['ctype2']){
$ctype2 = $_POST['ctype2'];
} else {
$error_msgs[] = "Please enter type of work or type N/A";
$errors++; 
}

if ($_POST['cwage2']){
$cwage2 = $_POST['cwage2'];
} else {
$error_msgs[] = "Please enter wage earned or type 0.00 if N/A";
$errors++; 
}

if ($_POST['cstart2']){
$cstart2 = $POST['cstart2'];
} else {
$error_msgs[] = "Please enter date started or type N/A";
$errors++; 
}

if ($_POST['cend2']){
$cend2 = $POST['cend2'];
} else {
$error_msgs[] = "Please enter date ended or type N/A";
$errors++; 
}

if ($_POST['reason2']){
$reason2 = $_POST['reason2'];
} else {
$error_msgs[] = "Please enter reason for leaving or type N/A";
$errors++; 
}

if ($_POST['cname3']){
$cname3 = $_POST['cname3'];
} else {
$error_msgs[] = "Please enter company name or type N/A";
$errors++; 
}

if ($_POST['caddress3']){
$caddress3 = $_POST['caddress3'];
} else {
$error_msgs[] = "Please enter company address or type N/A";
$errors++; 
}

if ($_POST['cphone3']){
$cphone3 = $_POST['cphone3'];
} else {
$error_msgs[] = "Please enter company phone number or type N/A";
$errors++; 
}

if ($_POST['ccperson3']){
$ccperson3 = $_POST['ccperson3'];
} else {
$error_msgs[] = "Please enter company contact person's name or type N/A";
$errors++; 
}

if ($_POST['ctype3']){
$ctype3 = $_POST['ctype3'];
} else {
$error_msgs[] = "Please enter type of work or type N/A";
$errors++; 
}

if ($_POST['cwage3']){
$cwage3 = $_POST['cwage3'];
} else {
$error_msgs[] = "Please enter wage earned or type 0.00 if N/A";
$errors++; 
}

if ($_POST['cstart3']){
$cstart3 = $POST['cstart3'];
} else {
$error_msgs[] = "Please enter date started or type N/A";
$errors++; 
}

if ($_POST['cend3']){
$cend3 = $POST['cend3'];
} else {
$error_msgs[] = "Please enter date ended or type N/A";
$errors++; 
}

if ($_POST['reason3']){
$reason3 = $_POST['reason3'];
} else {
$error_msgs[] = "Please enter reason for leaving or type N/A";
$errors++; 
}

if ($_POST['maywe']){
$maywe = $_POST['maywe'];
} else {
$error_msgs[] = "Type names of companies you do not want us to contact, or type, ok all";
$errors++; 
}

if ($_POST['additional']){
$additional = $_POST['additional'];
} else {
$error_msgs[] = "Type N/A if you do not have any additional information";
$errors++; 
}

if ($_POST['fn']){
$fn = $_POST['fn'];
} else {
$error_msgs[] = "Please enter your full name";
$errors++; 
}

if ($_POST['electronicsignssn']){
$electronicsignssn = $_POST['electronicsignssn'];
} else {
$error_msgs[] = "Please enter your 9 digit social security number";
$errors++; 
}

if ($_POST['emailaddress']){
$emailaddress = $_POST['emailaddress'];
} else {
$error_msgs[] = "Please enter your email address";
$errors++; 
}

if ($errors > 0) {
foreach ($error_msgs as &$msg) {
"There is/are " . $errors . " error(s) in your submission, please click your browser's back button and correct them.<br/>";
echo $msg . "<br/>";
}
} else {
mail( "heitfieldmichael@yahoo.com, "Application for $fn", $body, "From: $emailaddress\r\n" );
header( "Location: http://www.creativeurethanes.com/Thankyoupageforjobapplication.html" );
}
?>

Changed a lot

<?php
$first_name = $_REQUEST['first_name'] ;
$last_name = $_REQUEST['last_name'] ;
$ssn = $_REQUEST['ssn'] ;
$phone = $_REQUEST['phone'] ;
$address = $_REQUEST['address'] ;
$city = $_REQUEST['city'] ;
$state = $_REQUEST['state'] ;
$zip = $_REQUEST['zip'] ;
$position = $_REQUEST['position'] ;
$wage = $_REQUEST['wage'] ;
$911name = $_REQUEST['911name'] ;
$911address = $_REQUEST['911address'] ;
$911city = $_REQUEST['911city'] ;
$911state = $_REQUEST['911state'] ;
$911zip = $_REQUEST['911zip'] ;
$911phone = $_REQUEST['911phone'] ;
$highest = $_REQUEST['highest'] ;
$degrees = $_REQUEST['degrees'] ;
$age = $_REQUEST['age'] ;
$problems = $_REQUEST['problems'] ;
$shiftwork = $_REQUEST['shiftwork'] ;
$apprenticeship = $_REQUEST['apprenticeship'] ;
$disabilities = $_REQUEST['disabilities'] ;
$ifyes = $_REQUEST['ifyes'] ;
$accomodate = $_REQUEST['accomodate'] ;
$experience = $_REQUEST['experience'] ;
$ifyes2 = $_REQUEST['ifyes2'] ;
$cname = $_REQUEST['cname'] ;
$caddress = $_REQUEST['caddress'] ;
$cphone = $_REQUEST['cphone'] ;
$ccperson = $_REQUEST['ccperson'] ;
$ctype = $_REQUEST['ctype'] ;
$cwage = $_REQUEST['cwage'] ;
$sted = $_REQUEST['sted'] ;
$reason = $_REQUEST['reason'] ;
$cname2 = $_REQUEST['cname2'] ;
$caddress2 = $_REQUEST['caddress2'] ;
$cphone2 = $_REQUEST['cphone2'] ;
$ccperson2 = $_REQUEST['ccperson2'] ;
$ctype2 = $_REQUEST['ctype2'] ;
$cwage2 = $_REQUEST['cwage2'] ;
$sted2 = $_REQUEST['sted2'] ;
$reason2 = $_REQUEST['reason2'] ;
$cname3 = $_REQUEST['cname3'] ;
$caddress3 = $_REQUEST['caddress3'] ;
$cphone3 = $_REQUEST['cphone3'] ;
$ccperson3 = $_REQUEST['ccperson3'] ;
$ctype3 = $_REQUEST['ctype3'] ;
$cwage3 = $_REQUEST['cwage3'] ;
$sted3 = $_REQUEST['sted3'] ;
$reason3 = $_REQUEST['reason3'] ;
$maywe = $_REQUEST['maywe'] ;
$additional = $_REQUEST['additional'] ;
$electronicsignfn = $_REQUEST['electronicsignfn'] ;
$electronicsignssn = $_REQUEST['electronicsignssn'] ;
$emailaddress = $_REQUEST['emailaddress'] ;

mail( "cuinfo@creativeurethanes.com", "Application",
$first_name, $last_name, $ssn, $phone, $address, $city, $state, $zip, $position, $wage, $911name, $911address, $911city, $911state, $911zip, $911phone, $highest, $degrees, $age, $problems, $shiftwork, $apprenticeship, $disabilities, $ifyes, $accomodate, $experience, $ifyes2, $cname, $caddress, $cphone, $ccperson, $ctype, $cwage, $sted, $reason, $cname2, $caddress2, $cphone2, $ccperson2, $ctype2, $cwage2, $sted2, $reason2, $cname3, $caddress3, $cphone3, $ccperson3, $ctype3, $cwage3, $sted3, $reason3, $maywe, $additional, $electronicsignfn, $electronicsignssn, $emailaddress, "From: $emailaddress" );
header( "Location: http://www.creativeurethanes.com/Thankyou.html" );
?>

So, I have the php figured out I thought, but keep coming up with an internal server error. What did I do wrong? I have the sendmail.php file, the Thankyou.html file, and the application file all set up. Why does it go to HTTP 500 internal server error page when I hit submit for a test run?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T16:15:13+00:00Added an answer on June 7, 2026 at 4:15 pm

    I agree with the others, you really should read up on the mail function linked in the comments. The structure for the function is mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )

    You need to put everything you want in the body of the message into one string, and then pass that string into the mail function. In the end, it will look like

    mail( "cuinfo@creativeurethanes.com", "Application", $body, "From: $emailaddress" );
    

    Make sure you properly format the $body so it’s not a big jumble of text (put \r\n after each line)

    Here’s the example of the code:

    <?php
    $body = "First Name: ".$_REQUEST['first_name'] ."\r\n";
    $body .= "Last Name: ".$_REQUEST['last_name'] ."\r\n";
    $body .= "SSN Name: ".$_REQUEST['ssn'] ."\r\n";
    
    // Keep adding the information here
    
    mail( "cuinfo@creativeurethanes.com", "Application",$body, "From: $emailaddress\r\n" );
    header( "Location: http://www.creativeurethanes.com/Thankyou.html" );
    
    ?>
    

    Make sure you also add the \r\n after the From address

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When retrieving data from MySQL, the PHP array output has both numeric and name
What I have.. $.getJSON('ui-DashboardWidgetsGet.php', function(msg) { alert(msg); if(msg.error == yes){console.log('Error Found: '+ msg.errorMsg);} else
A PHP Error was encountered Severity: Notice Message: Uninitialized string offset: 0 Filename: index.php
I come across this:- PHP Error handling: die() Vs trigger_error() Vs throw Exception and
I'm receiving this PHP error while trying to use the Normalizer class, specifically the
I get a strange PHP error after updating my php version to 5.4.0-3. I
Given that I have a custom PHP error handler already, does it make sense
When I run php-closure i get a PHP error Undefined index: HTTP_IF_NONE_MATCH in <b>/php-closure.php</b>
<?php error_reporting(E_ALL); include func.php; connectToDatabase(localhost,root,,test); $fileName = $_FILES['name']; $fileSize = $_FILES['size']; $fileType = $_FILES['type'];
I am getting a Unable to load the requested file: default.php error in codeigniter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.