Getting checkbox values to appear in email with php - php

Hello I'm having trouble getting my checkbox values to show in my email.
I have looked around and tired many different solutions none seem to work.
I created this application for my web site. Please help me solve this issue.
The form does send an email. information does show up just not for the checkboxes.
This is the html code for the form.
<form id="jobapp" name="jobapp" method="post" action="jobappprocess.php">
<p><span class="h2">Personal Information</span></p>
<table width="742" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td width="121" align="right" valign="middle"><label for="firstname">First Name:</label></td>
<td width="240" align="left" valign="middle"><input name="firstname" type="text" id="firstname" size="30" maxlength="35" /></td>
<td width="106" align="right" valign="middle">Middle Intial:</td>
<td width="241" align="left" valign="middle"><input name="middleintial" type="text" id="middleintial" size="1" maxlength="1" /></td>
</tr>
<tr>
<td align="right" valign="middle">Last Name:</td>
<td align="left" valign="middle"><input name="lastname" type="text" id="lastname" size="30" maxlength="35" /></td>
<td align="right" valign="middle">Social Security
Number:</td>
<td align="left" valign="middle"><input name="ssn" type="text" id="ssn" size="13" maxlength="11" /></td>
</tr>
<tr>
<td align="right" valign="middle"> </td>
<td align="left" valign="middle"> </td>
<td align="right" valign="middle"> </td>
<td align="left" valign="middle"> </td>
</tr>
<tr>
<td align="right" valign="middle">Street Address:</td>
<td align="left" valign="middle"><input name="streetaddress" type="text" id="streetaddress" size="40" maxlength="90" /></td>
<td align="right" valign="middle">City:</td>
<td align="left" valign="middle"><input name="city" type="text" id="city" size="40" maxlength="90" /></td>
</tr>
<tr>
<td align="right" valign="middle"><label for="zipcode2">Zip Code</label></td>
<td align="left" valign="middle"><input name="zipcode" type="text" id="zipcode" size="7" maxlength="5" /></td>
<td align="right" valign="middle">State:</td>
<td align="left" valign="middle"><input name="state" type="text" id="state" size="2" maxlength="2" /></td>
</tr>
<tr>
<td align="right" valign="middle"><p>Previous Address<br />
</p></td>
<td align="left" valign="middle"><input name="previousaddress" type="text" id="previousaddress" size="40" maxlength="90" /></td>
<td colspan="2" align="right" valign="middle"> </td>
</tr>
<tr>
<td align="right" valign="middle">Home Phone:</td>
<td align="left" valign="middle"><input name="homephone" type="text" id="homephone" size="15" maxlength="13" /></td>
<td align="right" valign="middle">Mobile Phone:</td>
<td align="left" valign="middle"><input name="mobilephone" type="text" id="mobilephone" size="15" maxlength="13" /></td>
</tr>
<tr>
<td align="right" valign="middle"><label for="emailaddress">Email Address</label>
: </td>
<td align="left" valign="middle"><input name="emailaddress" type="text" id="emailaddress" size="35" maxlength="40" /></td>
<td colspan="2" align="right" valign="middle"> </td>
</tr>
<tr>
<td align="right" valign="middle">Are you 18 years of age or older?</td>
<td align="left" valign="middle"><label>
<input type="radio" name="areyou18[]" value="Yes" id="areyou18" />
Yes</label>
<br />
<label>
<input type="radio" name="areyou18[]" value="No" id="areyou18" />
No</label></td>
<td colspan="2" align="right" valign="middle"> </td>
</tr>
</table>
<p class="h2">Position Desired</p>
<table width="850" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td width="218" align="right" valign="middle"><label for="positiondesired">What positon are you applying for?</label></td>
<td width="218" align="left" valign="middle"><input name="positiondesired" type="text" id="positiondesired" size="30" maxlength="30" /></td>
<td width="228" align="right"><label for="startdate">What date are you available to start?</label></td>
<td width="150" align="left" valign="middle"><input name="startdate" type="text" id="startdate" size="20" maxlength="10" /></td>
</tr>
<tr>
<td align="right" valign="middle">Type of Employment:</td>
<td align="left" valign="middle"><p>
<label>
<input type="radio" name="typeofemployment[]" value="Full-time" id="TypeofEmployment_0" />
Full-time</label>
<br />
<label>
<input type="radio" name="typeofemployment[]" value="Part-time" id="TypeofEmployment_1" />
Part-time</label>
<br />
</p></td>
<td align="right">Days Available for work:</td>
<td align="left" valign="middle"><p>
<input type="checkbox" name="sunday[]" id="sunday" />
<label for="sunday">sun</label>
</p>
<p>
<input type="checkbox" name="monday[]" id="monday" />
<label for="monday[]">mon</label>
</p>
<p>
<input type="checkbox" name="tuesday[]" id="tuesday" />
<label for="tuesday">tue</label>
</p>
<p>
<input type="checkbox" name="wednesday[]" id="wednesday" />
<label for="wednesday">wed</label>
</p>
<p>
<input type="checkbox" name="thursday[]" id="thursday" />
<label for="thursday">thur</label>
</p>
<p>
<input type="checkbox" name="friday[]" id="friday" />
<label for="friday">fri</label>
</p>
<p>
<input type="checkbox" name="saturday[]" id="saturday" />
<label for="saturday">sat</label>
<br />
</p></td>
</tr>
</table>
<p class="h2">Education</p>
<table width="850" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td align="right" valign="middle"><label for="highschool">High School:</label></td>
<td align="left" valign="middle"><input name="highschool" type="text" id="highschool" size="50" maxlength="50" /></td>
<td align="right" valign="middle"><label for="hsdatesattended">Dates Attended:</label></td>
<td align="left" valign="middle"><input name="hsdatesattended" type="text" id="hsdatesattended" size="30" maxlength="25" /></td>
</tr>
<tr>
<td align="right" valign="middle">Did you Graduate?</td>
<td align="left" valign="middle"><label>
<input type="checkbox" name="hsgraduate[]" value="Yes" id="Graduate_0" />
Yes</label>
<br />
<label>
<input type="checkbox" name="hsgraduate[]" value="No" id="Graduate_1" />
No</label></td>
<td align="right" valign="middle"> </td>
<td align="left" valign="middle"> </td>
</tr>
<tr>
<td align="right" valign="middle"><label for="college2">College or University:</label></td>
<td align="left" valign="middle"><input name="college" type="text" id="college" size="50" maxlength="60" /></td>
<td align="right" valign="middle">Dates Attended:</td>
<td align="left" valign="middle"><input name="collegedates" type="text" id="collegedates" size="30" maxlength="25" /></td>
</tr>
<tr>
<td align="right" valign="middle"><label for="achievements2">Achievements: List your degrees, certificates, and awards, if any.</label></td>
<td align="left" valign="middle"><textarea name="achievements" id="achievements" cols="30" rows="3"></textarea></td>
<td align="right" valign="middle">Did you Graduate?</td>
<td align="left" valign="middle"><input type="checkbox" name="collegegradyes[]" id="yes" />
<label for="yes">yes<br />
<input type="checkbox" name="collegegradno[]" id="no" />
no </label></td>
</tr>
<tr>
<td align="right" valign="middle"><p> </p></td>
<td align="left" valign="middle"><p><br />
</p></td>
<td align="right" valign="middle"> </td>
<td align="left" valign="middle"> </td>
</tr>
<tr>
<td align="right" valign="middle">Have you served as a member of the U.S. Armed Forces?</td>
<td align="left" valign="middle"><label>
<input type="checkbox" name="armedforces[]" value="Yes" id="armedforces" />
Yes</label>
<br />
<label>
<input type="checkbox" name="armedForces[]" value="No" id="armedforces" />
No</label></td>
<td align="right" valign="middle"> </td>
<td align="left" valign="middle"> </td>
</tr>
<tr>
<td align="right" valign="middle">Branch/Services:</td>
<td align="left" valign="middle"><input name="afbranch" type="text" id="afbranch" size="30" maxlength="25" /></td>
<td align="right" valign="middle">Rank/Speciaty</td>
<td align="left" valign="middle"><input name="afrank" type="text" id="afrank" size="30" maxlength="25" /></td>
</tr>
</table>
<p class="h2"> Work Experience</p>
<table width="850" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td width="99" align="right"><label for="presentlastemployer">Present or Last Employer:</label></td>
<td width="287" align="left"><input name="presentlastemployer" type="text" id="presentlastemployer" size="40" maxlength="30" /></td>
<td width="127" align="right"><label for="plphone">Telephone:</label></td>
<td width="150" align="left"><input name="plphone" type="text" id="plphone" size="15" maxlength="13" /> </td>
</tr>
<tr>
<td align="right"><label for="pladdress">Street Address:</label></td>
<td align="left"><input name="pladdress" type="text" id="pladdress" size="40" maxlength="90" /></td>
<td align="right"><label for="plcity">City:</label></td>
<td align="left"><input name="plcity" type="text" id="plcity" size="30" maxlength="25" /></td>
</tr>
<tr>
<td align="right">State:</td>
<td align="left"><input name="plstate" type="text" id="plstate" size="2" maxlength="2" /></td>
<td align="right">Zip Code:</td>
<td align="left"><input name="plzipcode" type="text" id="plzipcode" size="7" maxlength="5" /></td>
</tr>
<tr>
<td align="right">Position Held:</td>
<td align="left"><input name="plposition" type="text" id="plposition" size="30" maxlength="30" /></td>
<td align="right">Dates of Employment:</td>
<td align="left"><input name="pldates" type="text" id="pldates" size="30" maxlength="25" /></td>
</tr>
<tr>
<td align="right">Job Description:</td>
<td align="left"><textarea name="pldescription" id="pldescription" cols="45" rows="5"></textarea></td>
<td align="right">Supervisor:</td>
<td align="left"><input name="plsupervisor" type="text" id="plsupervisor" size="40" maxlength="35" /></td>
</tr>
<tr>
<td align="right">Reason for Leaving:</td>
<td align="left"><p>
<textarea name="plreasonforleaving" id="plreasonforleaving" cols="45" rows="5"></textarea>
<br />
</p></td>
<td align="right">Salary:</td>
<td align="left"><input name="plsalary" type="text" id="plsalary" size="20" maxlength="15" /></td>
</tr>
<tr>
<td align="right">May we contact your present employer?</td>
<td align="left"><label>
<input type="checkbox" name="plmaywecontact[]" value="Yes" id="plmaywecontact" />
Yes</label>
<br />
<label>
<input type="checkbox" name="plmaywecontact[]" value="No" id="plmaywecontact" />
No</label></td>
<td align="right"> </td>
<td align="right"> </td>
</tr>
<tr>
<td colspan="4" align="center" class="h2"> More Work Experience</td>
</tr>
<tr>
<td align="right">Previous Employer:</td>
<td align="left"><input name="previousemployer" type="text" id="previousemployer" size="40" maxlength="30" /></td>
<td align="right">Telephone:</td>
<td align="left"><input name="pephone" type="text" id="pephone" size="15" maxlength="13" /></td>
</tr>
<tr>
<td align="right"><label for="peaddress2">Address:</label></td>
<td align="left"><input name="peaddress" type="text" id="peaddress" size="40" maxlength="50" /></td>
<td align="right">City:</td>
<td align="left"><input name="pecity" type="text" id="pecity" size="30" maxlength="25" /></td>
</tr>
<tr>
<td align="right">State:</td>
<td align="left"><input name="pestate" type="text" id="pestate" size="2" maxlength="2" /></td>
<td align="right">Zip Code:</td>
<td align="left"><input name="pezipcode" type="text" id="pezipcode" size="7" maxlength="5" /></td>
</tr>
<tr>
<td align="right">Position Held:</td>
<td align="left"><input name="peposition" type="text" id="peposition" size="30" maxlength="20" /></td>
<td align="right">Dates of Employment:</td>
<td align="left"><input name="pedates" type="text" id="pedates" size="30" maxlength="25" /></td>
</tr>
<tr>
<td align="right">Job description:</td>
<td align="left"><textarea name="pedescription" id="pedescription" cols="45" rows="5"></textarea></td>
<td align="right">Supervisor</td>
<td align="left"><input name="pesupervisor" type="text" id="pesupervisor" size="35" maxlength="30" /></td>
</tr>
<tr class="agree">
<td align="right">Reason for leaving:</td>
<td align="center" class="agree"><textarea name="peresasonforleaving" id="peresasonforleaving" cols="45" rows="5"></textarea></td>
<td align="right" class="agree">Salary:</td>
<td align="left" class="agree"><input type="text" name="pesalary" id="pesalary" /></td>
</tr>
</table>
<p> </p>
<table width="500" border="0" cellspacing="0" cellpadding="3">
<tr>
<td colspan="2"><span class="agree"></span></td>
</tr>
<tr>
<td width="362" align="center"><span class="h2">Do you accept the terms of this application?</span></td>
<td width="120"><span class="h2">
<label>
<input type="radio" name="acceptterms[]" value="Yes" id="AcceptTermsofapplication_0" />
Yes</label>
<br />
<label>
<input type="radio" name="acceptterms[]" value="No" id="AcceptTermsofapplication_1" />
No</label>
</span></td>
</tr>
<tr>
<td colspan="2" align="center"><input name="submitapp" type="submit" id="Submit Application" onclick="MM_validateForm('firstname','','R','lastname','','R','ssn','','RisNum','streetaddress','','R','city','','R','zipcode','','RisNum','state','','R','homephone','','RisNum','mobilephone','','RisNum','emailaddress','','RisEmail','positiondesired','','R','startdate','','RisNum','highschool','','R','presentlastemployer','','R','pladdress','','R','plstate','','R','plposition','','R','pldates','','R','plsupervisor','','R','plsalary','','NisNum','pephone','','NisNum','pezipcode','','NisNum','pedates','','NisNum','pesalary','','NisNum','pldescription','','R','plreasonforleaving','','R');return document.MM_returnValue" value="Submit Application" /></td>
</tr>
</table>
<p class="h2"> </p>
<p class="h2"> </p>
</form></td>
</tr>
</table>
And this is the php code
<?php
foreach ($_SESSION['Checkbox'] as $val) {
$checkboxresults .= $val.",\n";
}
echo (is_array($_REQUEST['$checkbox']) ? implode("\n", $_REQUEST['$checkbox']) : $_REQUEST['$checkbox']);
/* Subject and Email Variables */
$emailSubject = 'New Job Appilcant!';
$webMaster = '';
$from = 'emailaddressField';
/* Gathering Data Variables */
$firstnameField = $_POST['firstname'];
$lastnameField = $_POST['lastname'];
$middleintialField = $_POST['middleintial'];
$streetaddressField = $_POST['streetaddress'];
$cityField = $_POST['city'];
$stateField = $_POST['state'];
$zipcodeField = $_POST['zipcode'];
$ssnField = $_POST['ssn'];
$previousaddressField = $_POST['previousaddress'];
$homephoneField = $_POST['homephone'];
$mobilephoneField = $_POST['mobilephone'];
$emailaddressField = $_POST['emailaddress'];
$areyou18Field = $_POST['areyou18'];
$positiondesiredField = $_POST['positiondesired'];
$startdateField = $_POST['startdate'];
$typeofemploymentField = $_POST['typeofemployment'];
$sundayField = $_POST ['sunday'];
$mondayField = $_POST ['monday'];
$tuesdayField = $_POST ['tuesday'];
$wednesdayField = $_POST ['wednesday'];
$thursdayField = $_POST ['thursday'];
$fridayField = $_POST ['friday'];
$saturdayField = $_POST ['saturday'];
$highschoolField = $_POST['highschool'];
$hsdatesattendedField = $_POST['hsdatesattended'];
$hsgraduateField = $_POST['hsgraduate'];
$collegeField = $_POST['college'];
$collegedatesField = $_POST['collegedates'];
$collegegradyesField = $_POST['collegegradyes'];
$collegegradnoField = $_POST['collegegradno'];
$achievementsField = $_POST['achievements'];
$armedforcesField = $_POST['armedforces'];
$afbranchField = $_POST['afbranch'];
$afrankField = $_POST['afrank'];
$previouslastemployerField = $_POST['previouslastemployer'];
$plphoneField = $_POST['plphone'];
$pldatesField = $_POST['pldates'];
$pladdressField = $_POST['pladdress'];
$plcityField = $_POST['plcity'];
$plstateField = $_POST['plstate'];
$plzipcodeField = $_POST['plzipcode'];
$plsupervisorField = $_POST['plsupervisor'];
$plpositionField = $_POST['plposition'];
$pldescriptionField = $_POST['pldescription'];
$plsalaryField = $_POST['plsalary'];
$plreasonforleavingField = $_POST['plreasonforleaving'];
$maywecontactField = $_POST['maywecontact'];
$previousemployerField = $_POST['previousemployer'];
$pephoneField = $_POST['pephone'];
$pedatesField = $_POST['pedates'];
$peaddressField = $_POST['peaddress'];
$pecityField = $_POST['pecity'];
$pestateField = $_POST['pestate'];
$pezipcodeField = $_POST['pezipcode'];
$pesupervisorField = $_POST['pesupervisor'];
$pepositionField = $_POST['peposition'];
$pedescriptionField = $_POST['pedescription'];
$pesalaryField = $_POST['pesalary'];
$pereasonforleavingField = $_POST['acceptterms'];
$body = <<<EOD
<br><hr><br>
<p>
Name: $firstnameField $middleintialField $lastnameField <br><br>
Address: $streetaddressField $cityField $stateField $zipcodeField <br><br>
SSN: $ssnField <br><br>
Previous Address: $previousaddressField <br><br>
Home Phone: $homephoneField <br><br>
Mobile Phone: $mobilephoneField <br><br>
Email: $emailaddressField <br><br>
Eight-teen Plus: $areyou18Field <br><br>
Position Desired: $positiondesiredField <br><br>
Date available to start: $startdateField <br><br>
Type of Employment: $typeofemploymentField <br><br>
Days available to work: $sundayField, $mondayField, $tuesdayField, $wednesdayField, $thursdayField, $fridayField, $saturdayField
<br><hr><br>
High School: $highschoolField, $hsdatesattenedField, $hsgraduateField
<br><hr><br>
College: $collegeField, $collegedatesField, $collegegradyesField, $collegegradnoField, $achievements
<br><hr><br>
Armed Forces: $armedforcesField, $afbranchField, $afrankField
<br><hr><br>
Recent Employer <br>
<p>
$presentlastemployerField
$plphoneField
$pldatesField
$pladdressField
$plcityField
$plstateField
$plzipcodeField
$supervisorField
$plpositionField
$pldescriptionField
$plsalaryField
$plreasonforleavingField
$plmaywecontactField</p>
<br><hr><br>
Previous Employer <br>
<p>
$previousemployerField
$pephoneField
$pedatesField
$peaddressField
$pecityField
$pestateField
$pezipcodeField
$pesupervisorField
$pepositionField
$pedescriptionField
$pesalaryField
$pereasonforleavingField</p>
<br><hr><br>
Accept Terms of Employment <br><br>
$accepttermsField
EOD;
$headers = "From: $emailaddressField\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail ($webMaster, $emailSubject, $body, $headers);
?>
As I said the the form does submit. The check box values don't appear.
Thank you for in advance for any help offered.

Try to add 'value' attribute to the each checkbox input. I noticed that you forgot to do it for "Days Available for work" checkboxes.

Related

how to print same value as entered in above textbox

The user is asked to enter his/her name and the same name should be displayed in the username asked below by default.
I have tried this code, but it doesn't help me out!
<tr>
<td class="TrackMediumBlue" align="right" width="138">Manager Name :</td>
<td width="13"> </td>
<td width="477">
<input name="ManagerName" type="TEXT" id="ManagerName" size="40" maxlength="100"> </td>
</tr>
<tr>
<td class="TrackMediumBlue" align="right" width="138">UserName :</td>
<td width="13"> </td>
<td width="477">
<input name="ManagerName" type="TEXT" value="<?php echo ManagerName ?>" size="40" maxlength="100"> </td>
</tr>
Please help me out!
You have to do this with javascript:
<tr>
<td class="TrackMediumBlue" align="right" width="138">Manager Name:</td>
<td width="13"> </td>
<td width="477">
<input name="ManagerName" type="TEXT" id="ManagerName" size="40" maxlength="100">
</td>
</tr>
<tr>
<td class="TrackMediumBlue" align="right" width="138">UserName:</td>
<td width="13"> </td>
<td width="477">
<input name="ManagerName" type="TEXT" id="ManagerName2" size="40" maxlength="100">
</td>
</tr>
<script type="text/javascript">
document.getElementById('ManagerName').addEventListener('blur', function() {
document.getElementById('ManagerName2').value = this.value;
});
</script>
Add an id attribute to the second input. In the exemple above I use ManagerName2.
Edit: all code together.
<script>
document.getElementById('ManagerName').addEventListener('blur', function() {
document.getElementById('ManagerName2').value = this.value;
});
</script>
<tr>
<td class="TrackMediumBlue" align="right" width="138">Manager Name :</td>
<td width="13"> </td>
<td width="477">
<input name="ManagerName" type="TEXT" id="ManagerName" size="40" maxlength="100"> </td>
</tr>
<tr>
<td class="TrackMediumBlue" align="right" width="138">UserName :</td>
<td width="13"> </td>
<td width="477">
<input name="ManagerName2" type="TEXT" value="" size="40" maxlength="100"> </td>
</tr>

Getting a redirect on webpage when using file_get_contents()

I recently purchased the WS-1400-IP weather station from Ambient Weather that links up to Weather Underground. I am attempting to do a DOM query on the HTML of the IP link device. Here is my code:
(I know its very crude code, it's just a preliminary thing).
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
$filename = "http://10.175.3.28/bscsetting.htm";
$html = file_get_contents($filename);
echo "<input type=text value='{$html}'></input>";
$dom = new DOMDocument();
#$dom->loadHTML($html);
$x = new DOMXPath($dom);
$data = array();
foreach($x->query("//input") as $node)
{
$data[][$node->getAttribute("name")] = $node->getAttribute("value");
}
echo json_encode($data, JSON_PRETTY_PRINT);
And this is what I am seeing when I echo the HTML I am getting from the device:
<input type=text value='ction: Keep-Alive
Content-type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<meta http-equiv="refresh" content="0;URL=./bscsetting.htm">
<title></title>
<body leftmargin="80" topmargin="80" marginwidth="80" marginheight="0" bgcolor="#333">
<font size="+3"><strong><p align="center"></p></strong></font>
</body>
</html>
'></input>[
]
And here is what I should be seeing (as this is what I see when I use a regular browser):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>LiveData</title>
<link href="axcss0.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="right" bgcolor="#0088F7"> </td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF"><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20" height = "80"> </td>
<td ><img src="img/1.jpg" width="74" height="80" ></td>
<td width="10"> </td>
<td class="txtstyle_1" >ambient weather observerIP 2.0 </td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="right" bgcolor="#60B7FF"><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="120" align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><em>Version:2.0.0</em></font></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="left" bgcolor="#C0C0C0">
<table width="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#C0C0C0"><div class="menuitem_1">Local Network</div></td>
<td bgcolor="#C0C0C0"><div class="menuitem_1">Weather Network</div></td>
<td bgcolor="#C0C0C0"><div class="menuitem_1">Station Settings</div></td>
<td bgcolor="#EDEFEF"><div class="menuitem_1">Live Data</div></td>
<td bgcolor="#C0C0C0"><div class="menuitem_1">Calibration</div></td>
</tr>
</table>
</td>
</tr>
<form name="livedata" method="POST" onsubmit="return chkForm(0);">
<tr>
<td colspan="2" bgcolor="#EDEFEF"><div class="subitem_1">Live Data</div></td>
</tr>
<tr>
<td width="533" bgcolor="#EDEFEF"><div class="item_1">Receiver Time:</div></td>
<td width="307" bgcolor="#EDEFEF">
<input name="CurrTime" disabled="disabled" type="text" class="item_2" style="WIDTH: 120px" value="16:34 03/04/2015" maxlength="16"/></td>
</tr>
<tr>
<td width="533" bgcolor="#EDEFEF"><div class="item_1">Indoor Sensor ID</div></td>
<td width="307" bgcolor="#EDEFEF"><input name="IndoorID" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0x19" maxlength="4" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Outdoor Sensor1 ID</div></td>
<td bgcolor="#EDEFEF"><input name="Outdoor1ID" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0x94" maxlength="4" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Outdoor Sensor2 ID</div></td>
<td bgcolor="#EDEFEF"><input name="Outdoor2ID" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0x--" maxlength="4" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Indoor Temperature</div></td>
<td bgcolor="#EDEFEF"><input name="inTemp" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="71.2" maxlength="5" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Indoor Humidity</div></td>
<td bgcolor="#EDEFEF"><input name="inHumi" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="48" maxlength="3" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Absolute Pressure </div></td>
<td bgcolor="#EDEFEF"><input name="AbsPress" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="29.23" maxlength="6" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Relative Pressure </div></td>
<td bgcolor="#EDEFEF"><input name="RelPress" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="30.29" maxlength="6" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Outdoor Temperature</div></td>
<td bgcolor="#EDEFEF"><input name="outTemp" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="34.2" maxlength="5" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Outdoor Humidity </div></td>
<td bgcolor="#EDEFEF"><input name="outHumi" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="97" maxlength="3" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Wind Direction </div></td>
<td bgcolor="#EDEFEF"><input name="windir" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="228" maxlength="5" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Wind Speed </div></td>
<td bgcolor="#EDEFEF"><input name="avgwind" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="10.3" maxlength="5" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Wind Gust </div></td>
<td bgcolor="#EDEFEF"><input name="gustspeed" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="12.3" maxlength="5" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Solar Radiation </div></td>
<td bgcolor="#EDEFEF"><input name="solarrad" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="17.30" maxlength="12" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">UV </div></td>
<td bgcolor="#EDEFEF"><input name="uv" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="68" maxlength="12"></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">UVI </div></td>
<td bgcolor="#EDEFEF"><input name="uvi" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0" maxlength="2"></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Hourly Rain Rate</div></td>
<td bgcolor="#EDEFEF"><input name="rainofhourly" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="0.07" maxlength="7" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Daily Rain</div></td>
<td bgcolor="#EDEFEF"><input name="rainofdaily" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="1.81" maxlength="7" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Weekly Rain</div></td>
<td bgcolor="#EDEFEF"><input name="rainofweekly" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="2.10" maxlength="7" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Monthly Rain</div></td>
<td bgcolor="#EDEFEF"><input name="rainofmonthly" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="2.10" maxlength="7" /></td>
</tr>
<tr>
<td bgcolor="#EDEFEF"><div class="item_1">Yearly Rain</div></td>
<td bgcolor="#EDEFEF"><input name="rainofyearly" disabled="disabled" type="text" class="item_2" style="WIDTH: 80px" value="2.10" maxlength="7" /></td>
</tr>
<tr>
<td colspan="2" bgcolor="#EDEFEF"> </td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#EDEFEF">
<input name="rain_Default" type="button" class="item_2" style="WIDTH: 110px; HEIGHT: 24px;" onclick="raindef()" value="Rain Reset">
<input id="refresh_st" type="button" class="item_4" style="WIDTH: 110px; HEIGHT: 24px;" onclick="uiCtrl(this.value);" value="Refresh" />
<input id="refresh_sp" type="button" class="item_2" style="WIDTH: 110px; HEIGHT: 24px;" onclick="uiCtrl(this.value);" value="Stop Refresh" />
</td>
</tr>
</form>
<tr>
<td colspan="2" bgcolor="#EDEFEF"> </td>
</tr>
<tr>
<td colspan="2" bgcolor="#C0C0C0"> </td>
</tr>
</table>
<script src="axjs0.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
var rfTaskRuningFlag = 0, rfTimeId;
uiCtrl('Refresh');
function uiCtrl(uiCmd)
{
if (uiCmd=='Refresh'){
document.getElementById('refresh_st').disabled = true;
document.getElementById('refresh_sp').disabled = false;
rfTaskRuningFlag = 1;
rfTaskState = 0;
rfTimeId = setInterval("ss()",8000);
}else if (uiCmd=='Stop Refresh'){
document.getElementById('refresh_st').disabled = false;
document.getElementById('refresh_sp').disabled = true;
rfTaskRuningFlag = 0;
clearInterval(rfTimeId);
}
}
function ss()
{
if (rfTaskRuningFlag)
{
window.top.location.reload();
}
}
//-->
</script>
</body>
</html>
How do I get past the meta refresh? Any ideas?
EDIT: After trying curl, it works as expected.. Why would it make a difference?
They have an API and use JSON with RESTful protocol. You need to send your api key in your request to authenticate your server with their’s. It’s all free and can then specify what data you’re looking for both past and present. You can then display on your webpage or save to your database

how to upload photos with other detail like username, email , mobie etc

Here is my code to upload a Single Image. But i want to upload 3 images at a time.
How can i do it ?
<form enctype="multipart/form-data" action="process2.php" method="POST">
<table id="tbl1">
<tr>
<td>For Sale </td>
<td colspan="2">
<input type="hidden" name="id"/>
</td>
</tr>
<tr>
<td>Type: </td>
<td colspan="2">
<select name="type" id="slct"><option>Residential</option></select></td>
</tr>
<tr>
<td>State: </td><td colspan="2">
<select name="state" id="slct"><option>Punjab</option></select></td>
</tr>
<tr>
<td>City: </td><td colspan="2">
<select name="city" id="slct"><option>Lahore</option></select></td>
</tr>
<tr>
<td>Location: </td><td colspan="2">
<input name="location" placeholder="Enter Location Here" id="slct2" type="text" /></td>
</tr>
<tr>
<td>Bedrooms:</td><td colspan="2">
<select name="bedroom"><option>1</option></select></td>
</tr>
<tr>
<td>Land In: </td><td colspan="2">
<select name="landtype" id="slct"><option>Kanal</option></select>
</tr>
<tr>
<td>Land Area: </td><td colspan="2">
<input name="landarea" placeholder="Enter area here" id="slct2" type="text" /></td>
</tr>
<tr>
<td>Price: </td><td colspan="2">
<input name="price" placeholder="Enter price here" id="slct2" type="text" /></td>
</tr>
<tr>
<td>Photo</td>
<td ><input type="file" name="photo" id="file"/></td>
</tr>
<tr>
<td>User Details</td>
<td colspan="2">
</td>
</tr>
<tr>
<td>Name: </td><td colspan="2">
<input name="name" placeholder="full name" id="slct2" type="text" /></td>
</tr>
<tr>
<td>Mobile: </td><td colspan="2">
<input name="mobile" placeholder="format 03001234567" id="slct2" type="text" /></td>
</tr>
<tr>
<td>E-mail: </td><td colspan="2">
<input name="email" placeholder="Enter email Here" id="slct2" type="text" /></td>
</tr>
<tr>
<td></td><td colspan="2"><input type="submit" name="submit" value="Post"/></td>
</tr>
</table>
</form>
add code in HTML
<td>Photo1</td><td ><input type="file" name="photo1" id="file1"/></td>
<td>Photo2</td><td ><input type="file" name="photo2" id="file2"/></td>
Add this code in your html and check selected images in your "process2.php" those are selected that store in your database.
When you insert this images in your database that time just do "img1,img2,img3" store this in your image colum... This is the simplest way if your requirement is only 3 images then you can follow this.

Registration form will not submit data to database if I use action attribute to open a confirmation page

My code will submit data to my database if I use action="", but I want the action attribute to open a confirmation page to let users know their data has been registered. This confirmation page should appear onclick of the submit button and only after user's data has been stored in my database. My code will not submit data to my database if I use action="regconfirm.html" (which is my confirmation page), but the confirmation page opens like it should. I have tried to use onsubmit="location.href='...registerform/regconfirm.html'" and onclick="location.href='...registerform/regconfirm.html'" in the submit tag. This also doesn't submit data to my database. The form has many text fields and radio buttons which all work perfectly and validation is done using the required attribute in each field object's tag. I believe the problem is in the form tag I am providing all code in the body here.
<body>
**<form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="form" id="form">**
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"> </td>
<td width="497" colspan="2"> </td>
</tr>
<tr>
<td colspan="3" align="left" valign="top">(สามารถถ่ายเอกสารได้)</td>
<td colspan="2" rowspan="3" align="right"><table width="344" border="4" align="right" cellpadding="2" cellspacing="0" class="tableborder">
<tr>
<td width="306" colspan="2" align="right"><table width="326" border="0" cellspacing="0" cellpadding="4">
<tr>
<td align="right">ใบเสร็จรับเงินเลขท
<input name="text_1" type="text" class="formfield" id="text_1" value="<?php echo $row_Recordset1['text_1']; ?>" size="25" maxlength="255" autofocus required/></td>
</tr>
<tr>
<td align="right">ลงวันท
<input name="text_2" type="text" class="formfield" id="text_2" value="<?php echo $row_Recordset1['text_2']; ?>" size="25" maxlength="255" required/></td>
</tr>
<tr>
<td align="right">จำนวนเงิน
<input name="text_3" type="text" class="formfield" id="text_3" value="<?php echo $row_Recordset1['text_3']; ?>" size="25" maxlength="255" required/></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td height="33" colspan="3"> </td>
</tr>
<tr>
<td height="102" colspan="5" align="right"><img src="images/heading.jpg" alt="heading" width="731" height="96" align="absbottom" /></td>
</tr>
<tr>
<td width="87" align="left"><strong>ท่านเป็น</strong></td>
<td colspan="4" align="right">
<input name="RadioGroup2" type="radio" id="radio_1" value="Medicine" required/>
แพทย์
<input name="RadioGroup2" type="radio" id="radio_2" value="Nurse" required/>
พยาบาล
<input name="RadioGroup2" type="radio" id="radio_3" value="Academic" required/>
นักวิชาการ
<input name="RadioGroup2" type="radio" id="radio_4" value="Other" required/>
อื่นๆ
<input name="text_4" type="text" class="formfield" id="text_4" value="<?php echo $row_Recordset1['text_4']; ?>" size="49" maxlength="255" required/></td>
</tr>
<tr>
<td> </td>
<td width="84"> </td>
<td width="1"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2" align="left">ชื่อ..(โปรดระบุคำนำหน้า)</td>
<td colspan="3" align="right"><input name="text_5" type="text" class="formfield" id="text_5" value="<?php echo $row_Recordset1['text_5']; ?>" size="84" maxlength="255" required/></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td colspan="2"> </td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="5">โรงพยาบาล
<input name="text_6" type="text" class="formfield" id="text_6" value="<?php echo $row_Recordset1['text_6']; ?>" size="40" maxlength="255" required/></td>
<td colspan="5" align="right">แผนก/หน่วย/ภาควิชา
<input name="text_7" type="text" class="formfield" id="text_7" value="<?php echo $row_Recordset1['text_7']; ?>" size="29" maxlength="255" required/></td>
</tr>
<tr>
<td width="50"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="70"> </td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="266">เลขใบประกอบวิชาชีพ (แพทย์ / พยาบาล)</td>
<td width="417" align="right"><input name="text_8" type="text" class="formfield" id="text_8" value="<?php echo $row_Recordset1['text_8']; ?>" size="71" maxlength="255" required/></td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="169">เลขที่สมาชิกสภาพยาบาล</td>
<td width="514" colspan="7" align="right"><input name="text_9" type="text" class="formfield" id="text_9" value="<?php echo $row_Recordset1['text_9']; ?>" size="87" maxlength="255" required/></td>
</tr>
<tr>
<td colspan="8"> </td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="99">ที่อยู่ที่ติดต่อได้</td>
<td width="612" colspan="8" align="right"><input name="text_10" type="text" class="formfield" id="text_10" value="<?php echo $row_Recordset1['text_10']; ?>" size="98" maxlength="255" required/></td>
</tr>
<tr>
<td colspan="9"> </td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="41">มือถือ</td>
<td width="642" align="right"><input name="text_11" type="text" class="formfield" id="text_11" value="<?php echo $row_Recordset1['text_11']; ?>" size="108" maxlength="255" required/></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="295">โทรศัพท์
<input name="text_12" type="text" class="formfield" id="text_12" value="<?php echo $row_Recordset1['text_12']; ?>" size="35" maxlength="255" required/></td>
<td width="388" align="right">โทรสาร
<input name="text_13" type="text" class="formfield" id="text_13" value="<?php echo $row_Recordset1['text_13']; ?>" size="53" maxlength="255" required/></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="42">E-mail: </td>
<td width="641" align="right"><input name="text_14" type="email" class="formfield" id="email" value="<?php echo $row_Recordset1['text_14']; ?>" size="108" maxlength="255" required/></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="290">หากสนับสนุนโดยบริษัท (โปรดระบุ) ชื่อผู้แทน</td>
<td width="393" align="right"><input name="text_15" type="text" class="formfield" id="text_15" value="<?php echo $row_Recordset1['text_15']; ?>" size="66" maxlength="255" required/></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="52">โทรศัพท์</td>
<td width="631" align="right"><input name="text_16" type="text" class="formfield" id="text_16" value="<?php echo $row_Recordset1['text_16']; ?>" size="105" maxlength="255" required/></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="123"><strong><u>รับประเภทอาหาร</u></strong></td>
<td width="15"> </td>
<td width="51">
<input name="RadioGroup1" type="radio" id="radio_5" value="Thailand" required/>
ไทย</td>
<td width="1"> </td>
<td width="76">
<input type="radio" name="RadioGroup1" value="Vegetarian" id="radio_6" required/>
มังสวิรัติ</td>
<td width="101">
<input type="radio" name="RadioGroup1" value="Islam" id="radio_7" required/>
อิสลาม</td>
<td width="216"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td colspan="2"> </td>
<td> </td>
<td> </td>
</tr>
</table>
<table width="729" border="4" align="center" cellpadding="0" cellspacing="0" class="blueborder_two">
<tr>
<td colspan="6"><table border="0" cellspacing="0" cellpadding="0" width="692">
<tr>
<td width="347" valign="top"><p align="center"><strong>อัตราค่าลงทะเบียน (บาท)</strong></p></td>
<td width="95" valign="top"><p align="center"><strong><u>ก่อน</u></strong><strong>  </strong><br />
<strong>15  มี.ค.57</strong></p></td>
<td width="104" valign="top"><p align="center"><strong><u>ตั้งแต่</u></strong><strong> </strong><strong> </strong><br />
<strong>15 มี.ค.57</strong></p></td>
<td width="95" valign="top"><p align="center"><strong><u>หน้างาน</u></strong></p></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="6"><table border="0" cellspacing="0" cellpadding="0" width="692">
<tr>
<td height="37" colspan="4" valign="middle"><span class="numbertext"><strong><img src="images/space.jpg" width="6" height="9" alt="space" />1</strong></span><strong>. <span class="numbertext">Pre-congress workshops</span>    (เลือกได้ 1 หัวข้อเท่านั้น)</strong></td>
</tr>
<tr valign="middle">
<td width="341" height="15" class="numbertext"><input type="radio" name="RadioGroup3" value="1" id="RadioGroup3_0" required/>
<strong>1</strong></td>
<td width="93" class="numbertext"><input type="radio" name="RadioGroup4" value="2000" id="RadioGroup4_0" required/>
2000</td>
<td width="95" class="numbertext"><label>
<input type="radio" name="RadioGroup4" value="2300" id="RadioGroup4_1" required/>
2300</label></td>
<td width="77"><input type="radio" name="RadioGroup4" value="2800" id="RadioGroup4_2" required/>
<span class="numbertext">2800</span></td>
</tr>
<tr valign="middle">
<td height="40" class="numbertext"><input type="radio" name="RadioGroup3" value="2 " id="RadioGroup3_1" required/>
<strong>2
<label>
<input type="radio" name="RadioGroup3" value="3" id="RadioGroup3_2" required/>
<strong>3</strong></label>
<input type="radio" name="RadioGroup3" value="4" id="RadioGroup3_3" required/>
<strong>4</strong></strong></td>
<td width="93" class="numbertext"><input type="radio" name="RadioGroup5" value="1000" id="RadioGroup5_0" required/>
1000</td>
<td width="95" class="numbertext"><input type="radio" name="RadioGroup5" value="1300" id="RadioGroup5_1" required/>
1300</td>
<td width="77" class="numbertext"><label>
<input type="radio" name="RadioGroup5" value="1800" id="RadioGroup5_2" required/>
1800</label></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="6"><table border="0" cellspacing="0" cellpadding="0" width="692">
<tr>
<td height="37" colspan="4" valign="middle"><strong> <span class="numbertext"><img src="images/space.jpg" width="6" height="9" alt="space" />2</span>. ประชุมวิชาการ  <span class="numbertext">(Main Congress) </span></strong></td>
</tr>
<tr valign="middle">
<td width="341" height="30"><strong> <img src="images/space.jpg" width="6" height="9" alt="space" /><img src="images/bullet.jpg" width="8" height="8" alt="bullet" /> เป็นสมาชิกสมาคมเวชศาสตร์มารดาฯเลขที่......</strong></td>
<td width="93" class="numbertext"><input type="radio" name="RadioGroup6" value="1700" id="RadioGroup6_0" required/>
1700</td>
<td width="96" class="numbertext"><label>
<input type="radio" name="RadioGroup6" value="2000" id="RadioGroup6_1" required/>
2000</label></td>
<td width="76" class="numbertext"><strong>
<input type="radio" name="RadioGroup6" value="2500" id="RadioGroup6_2" required/>
</strong>2500</td>
</tr>
<tr valign="middle">
<td height="30"><strong><img src="images/space.jpg" width="6" height="9" alt="space" /><img src="images/bullet.jpg" width="8" height="8" alt="bullet" /></strong><strong>ไม่ได้เป็นสมาชิกสมาคมเวชศาสตร์มารดาฯ</strong><strong> </strong></td>
<td width="93" class="numbertext"><label>
<input type="radio" name="RadioGroup7" value="2200" id="RadioGroup7_0" required/>
2200</label></td>
<td width="96" class="numbertext"><label>
<input type="radio" name="RadioGroup7" value="2500" id="RadioGroup7_1" required/>
2500</label></td>
<td width="76" class="numbertext"><input type="radio" name="RadioGroup7" value="3000" id="RadioGroup7_2" required/>
3000</td>
</tr>
<tr valign="middle">
<td height="30"><strong><img src="images/space.jpg" width="6" height="9" alt="space" /><img src="images/bullet.jpg" width="8" height="8" alt="bullet" /> สำหรับ Resident / Fellow</strong></td>
<td class="numbertext"><input type="radio" name="RadioGroup8" value="800" id="RadioGroup8_0" required/>
800</td>
<td class="numbertext"><input type="radio" name="RadioGroup8" value="1000" id="RadioGroup8_1" required/>
1000</td>
<td class="numbertext"><input type="radio" name="RadioGroup8" value="1500" id="RadioGroup8_2" required/>
1500</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="6"><table border="0" cellspacing="0" cellpadding="0" width="692">
<tr>
<td height="37" colspan="5" valign="middle"><span class="numbertext"><strong><img src="images/space.jpg" width="6" height="9" alt="space" />3</strong></span><strong>. </strong><strong>สมัครสมาชิกสมาคมฯ ตลอดชีพ</strong></td>
</tr>
<tr>
<td width="250" height="50" valign="top" class="numbertext"><em class="bluetext"><img src="images/space.jpg" width="6" height="9" alt="space" />(ดาวน์โหลดใบสมัครสมาชิกสมาคมฯ  และส่ง<img src="images/space.jpg" width="6" height="9" alt="space" />มาพร้อมกับใบลงทะเบียนประชุม)</em></td>
<td width="80" valign="top" class="numbertext"> </td>
<td width="90"><label>
<input type="radio" name="RadioGroup9" value="800 " id="RadioGroup9_0" required/>
<span class="numbertext">800</span></label>
<br />
</td>
<td width="95" class="numbertext"><label>
<input type="radio" name="RadioGroup9" value="800 " id="RadioGroup9_1" required/>
800</label>
<br />
</td>
<td width="71"><span class="numbertext">
<label>
<input type="radio" name="RadioGroup9" value="800" id="RadioGroup9_2" required/>
800</label>
<br />
<strong></strong></span></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="6"><table width="692" border="0" cellpadding="0" cellspacing="0">
<tr>
<?php
$sql = 'UPDATE regform SET `total` = `radio_12` + `radio_15` + `radio_18` + `radio_21` +`radio_24` + `radio_27`';
?>
<td height="46" align="right"><strong>รวมค่าลงทะเบียน ข้อ <span class="numbertext">1+2+3</span>
<input name="text_17" type="text" class="formfield" id="text_17" value="<?php echo $row_Recordset1['total']; ?>" maxlength="255" required/>
<em><strong>บาท</strong></em></strong></td>
</tr>
</table></td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td>ต้องการให้ออกใบเสร็จในนาม  (ระบุ) </td>
<td align="right"><input name="text_18" type="text" class="formfield" id="text_18" value="<?php echo $row_Recordset1['text_18']; ?>" size="76" maxlength="255" required/></td>
</tr>
</table>
<table width="729" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td colspan="2"> </td>
<td width="63"> </td>
</tr>
<tr>
<td colspan="3"><strong class="yellowhighlight"><u>การชำระเงิน</u></strong>  <u> เมื่อสมาคมฯได้รับชำระเงินแล้วเท่านั้น จึงถือว่าการลงทะเบียนสมบูรณ์ </u></td>
</tr>
<tr>
<td width="26" valign="top"><input type="radio" name="RadioGroup10" value="Bank Transfer" id="RadioGroup10_0" required/>
<span class="paymenttext">Bank Transfer</span></td>
<td colspan="2">โอนเข้าบัญชี    “ <u>วิชาการสมาคมเวชศาสตร์มารดาและทารกในครรภ์ (ไทย)”</u>      ธนาคารกรุงไทย บัญชีออมทรัพย์   <br />
เลขที่  <u>041-0-08598-7</u>   สาขา <u>ถนนเพชรบุรีตัดใหม่</u></td>
</tr>
<tr>
<td valign="top"><input type="radio" name="RadioGroup10" value="Money Order" id="RadioGroup10_1" required/>
<span class="paymenttext">Money Order</span></td>
<td colspan="2"><label>ธนาณัติสั่งจ่าย</label>
  <u>ปณ. เพชรบุรีตัดใหม่ </u><u>10311</u>   ในนาม <u>ศ.นพ.เยื้อน  ตันนิรันดร</u>  และส่งธนาณัติตัวจริงพร้อมใบลงทะเบียน  <br />
มายังสมาคมฯ</td>
</tr>
<tr>
<td valign="top"><input type="radio" name="RadioGroup10" value="Cheque" id="RadioGroup10_2" required/>
<span class="paymenttext">Cheque</span></td>
<td colspan="2"> เช็คสั่งจ่าย(เช็คต่างจังหวัดเพิ่มค่าธรรมเนียม 30 บาท) บัญชี<u>วิชาการสมาคมเวชศาสตร์มารดาและทารกในครรภ์</u><u>(ไทย)</u></td>
</tr>
<tr>
<td valign="top"><input type="radio" name="RadioGroup10" value="Cash" id="RadioGroup10_3" required/>
<span class="paymenttext">Cash</span></td>
<td width="579"><label>เงินสด</label>
ณ สำนักงานสมาคมฯ<br />
<span class="bluetext">กรุณาส่งหลักฐานการชำระเงินพร้อมกับใบสมัครลงทะเบียนประชุมวิชาการ มายังสมาคมฯ โทรสาร :  02-7181488   หรือทาง<br />
E-mail : mfm_th#yahoo.com, por.boon#hotmail.com </span></td>
<td> </td>
</tr>
<tr>
<td colspan="3" valign="top"><span class="redtext"><strong class="yellowhighlight"><em><u>หมายเหตุ</u></em></strong>     </span>
<ol>
<li class="redtext">ลงทะเบียน  Workshop ต้องลงทะเบียนประชุมวิชาการด้วย และเลือกได้ 1  Workshop  เท่านั้น     </li>
<li class="redtext">ผู้สมัครเข้าเป็นสมาชิกใหม่ สามารถลงทะเบียนใช้อัตราสมาชิกได้เลย</li>
<li class="redtext">ผู้ลงทะเบียนหน้างาน อาจไม่ได้รับความสะดวก กระเป๋าและเอกสารประกอบการประชุมอาจไม่ครบถ้วน </li>
<li class="redtext"><strong><u>การยกเลิกการลงทะเบียน</u></strong> ผู้ที่ยกเลิกการลงทะเบียนจะต้องส่งหนังสือขอยกเลิกลงทะเบียนเป็นลายลักษณ์อักษรมายังสมาคมฯ โดยจะได้รับคืนค่าลงทะเบียนภายหลังเสร็จสิ้นงานดังนี้  </li>
</ol>
<p><span class="redtext">ก่อนวันที่  10 เมษายน 2557 คืนร้อยละ 50 ของค่าลงทะเบียน     <br />
หลังวันที่  10 เมษายน 2557 ไม่คืนค่าลงทะเบียน</span><br />
<strong>  </strong><strong><em><u> </u></em></strong><br />
<strong><u>ส่งใบลงทะเบียน, ชำระค่าลงทะเบียน และสอบถามเพิ่มเติมได้ที่</u></strong><strong><u> </u></strong><br />
คุณพรธวัล   บุญชนะทองเลิศ   <br />
สมาคมเวชศาสตร์มารดาและทารกในครรภ์ (ไทย) <br />
อาคารเฉลิมพระบารมี ๕๐ ปี ชั้น 8  เลขที่ 2  ซอยศูนย์วิจัย  ถ.เพชรบุรีตัดใหม่   <br />
แขวงบางกะปิ  เขตห้วยขวาง  กรุงเทพฯ  10310<br />
โทร. 02-7181489     มือถือ  087-6957659      โทรสาร. 02-7181488   <br />
E-mail :  por.boon#hotmail.com  หรือ  mfm_th#yahoo.com <br />
Website :  www.thai-smfm.com</p></td>
</tr>
<tr>
<td colspan="3" valign="top"><img src="images/bottomtext.jpg" width="728" height="359" alt="bottomimage" /></td>
</tr>
<tr>
<td colspan="3" align="center" valign="top"><strong class="bottomtext">ดาวน์โหลดแบบฟอร์มจองที่พักได้ที่  www.thai-smfm.com</strong></td>
</tr>
<tr>
<td colspan="3" align="center" valign="top"><input name="submit" type="submit" class="submit" id="submit" value="Click Here to Register Now" onclick="location.href='http://localhost/registerform/regconfirm.html'"/>
</tr>
</table></td>
<td width="83"><p>
<input type="button" name="clear" value="Clear Form" onclick="clearForm(this.form);">
<input type="hidden" name="MM_insert" value="form" />
</p>
</form>
<
/body>
You can redirect to a html page with php when your code is done with writing to the database. The action tag should direct to the php file where your code handles the form data.
I hope i explained well.
cheers!
Send the form to action= "".
Once the data is saved in database, redirect the form to confirmation page through php.
Syntax for redirect in php :
header('Location:http://yourdomain.com/registerform/regconfirm.html');
exit;
Instead of using "regconfirm.html" create a "regconfirm.php"
Perform your database operation here.
once done regconfirm.php will show confirmation text.
example of form submit would be
< form action ="regconfirm.php" >
// Your Form Here
</form >

HTML form submits to php user gets email but my email is blank

I have a form that submits and send 2 emails: one email to the customer to confirm and the other email to my sales staff.
The email to the customer works just fine, and displays the name and email that are entered in the form in the body of the email
The email to my sales staff lists the information entered on the form. However, when the email is sent to my sales email address the body of the email shows up blank.
HTML:
<form id="RFQ" method="post" action="RFQ-result.php">
<h1 align="center">Request a Quote</h1>
<table width="640" border="0" cellpadding="2" align="center">
<tr>
<td height="32" colspan="6"><strong>PROJECT INFORMATION</strong></td>
</tr>
<tr>
<td width="14"> </td>
<td width="120" align="right">Project Name:</td>
<td colspan="4"><span id="spryProjectName">
<input name="ProjectName" type="text" id="ProjectName" size="50" />
<span class="textfieldRequiredMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td align="right"><label for="Company2">Company:</label></td>
<td colspan="4"><span id="spryCompany">
<input name="Company" type="text" id="Company" size="40" />
<span class="textfieldRequiredMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td align="right">Address:</td>
<td colspan="4"><span id="spryAddress">
<input name="Address" type="text" id="Address" size="50" />
<span class="textfieldRequiredMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td align="right">City: </td>
<td><span id="spryCity">
<input type="text" name="City" id="City" />
<span class="textfieldRequiredMsg">*</span></span></td>
<td width="1"> </td>
<td width="135" align="right">State / Province:</td>
<td width="154"><span id="spryState">
<input type="text" name="State" id="State" />
<span class="textfieldRequiredMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td align="right">Postal Code:</td>
<td width="178"><span id="spryZip">
<input name="Zip" type="text" id="Zip" size="10" maxlength="6" />
<span class="textfieldRequiredMsg">*</span></span></td>
<td> </td>
<td align="right">Country: </td>
<td><input type="text" name="Country" id="Country" /></td>
</tr>
<tr>
<td> </td>
<td align="right"> </td>
<td> </td>
<td> </td>
<td align="right"> </td>
<td> </td>
</tr>
</table>
<table width="640" border="0" cellpadding="2" align="center">
<tr>
<td height="32" colspan="6"><strong>CONTACT INFORMATION</strong></td>
</tr>
<tr>
<td width="15"> </td>
<td width="121" align="right">First Name:</td>
<td width="173"><span id="spryFirstName">
<input name="FirstName" type="text" id="FirstName" size="20" />
<span class="textfieldRequiredMsg">*</span></span></td>
<td width="1"> </td>
<td width="89" align="right">Last Name:</td>
<td width="203"><span id="spryLastName">
<input type="text" name="LastName" id="LastName" />
<span class="textfieldRequiredMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td align="right">Phone:</td>
<td><span id="spryPhone">
<input name="Phone" type="text" id="Phone" size="20" />
<span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
<td> </td>
<td align="right"><label for="Mobile2">Mobile:</label></td>
<td><span id="spryMobile">
<input name="Mobile" type="text" id="Mobile" size="20" />
<span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">*Invalid format</span></span></td>
</tr>
<tr>
<td> </td>
<td align="right">E-mail: </td>
<td colspan="4"><span id="spryEmail">
<input name="Email" type="text" id="Email" size="40" />
<span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td align="right"> </td>
<td colspan="4"> </td>
</tr>
</table>
<table width="640" border="0" cellpadding="2" align="center">
<tr> </tr>
</table>
<table width="640" border="0" cellpadding="2" align="center">
<tr>
<td height="33" colspan="5"><strong>STANDARD CONFIGURATION</strong></td>
</tr>
<tr>
<td> </td>
<td width="156" colspan="2" align="right">Location of Drive:</td>
<td width="437" colspan="2"><span id="spryDriveCity">
<label for="DriveCity"></label>
<input type="text" name="DriveCity" id="DriveCity" />
<span class="textfieldRequiredMsg">*</span></span>, <span id="spryDriveState">
<label for="DriveState"></label>
<input type="text" name="DriveState" id="DriveState" />
<span class="textfieldRequiredMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">Temperature Range:</td>
<td colspan="2"><span id="spryMinTemp">
<label for="MinTemp"></label>
<input name="MinTemp" type="text" id="MinTemp" size="5" />
- <span class="textfieldRequiredMsg">*</span></span><span id="spryMaxTemp">
<label for="MaxTemp"></label>
<input name="MaxTemp" type="text" id="MaxTemp" size="5" />
<span class="textfieldRequiredMsg">*</span></span> °C</td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">Altitude:</td>
<td colspan="2"><span id="spryAltitude">
<label for="Altitude"></label>
<input name="Altitude" type="text" id="Altitude" size="5" />
<span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format</span></span> ft</td>
</tr>
<tr>
<td width="15"> </td>
<td colspan="2" align="right"><label for="PumpType">Type of Application:</label></td>
<td colspan="2"><span id="spryPumpType">
<select name="PumpType" id="PumpType">
<option> </option>
<option value="Beam Pump">Beam Pump</option>
<option value="Progressive Cavity Pump">Progressive Cavity Pump</option>
<option value="Rotaflex Pump">Rotaflex Pump</option>
<option value="Submersible Pump">Submersible Pump</option>
<option value="Surface Centrifugal Compressor">Surface Centrifugal Compressor</option>
<option value="Surface Centrifugal Pump">Surface Centrifugal Pump</option>
<option value="Surface Reciprocating Compressor">Surface Reciprocating Compressor</option>
<option value="Surface Reciprocating Pump">Surface Reciprocating Pump</option>
</select>
<span class="selectRequiredMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">Drive Manufacturer:</td>
<td colspan="2"><span id="spryManufacturer">
<label for="Manufacturer"></label>
<input name="Manufacturer" type="text" id="Manufacturer" size="25" />
<span class="textfieldRequiredMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">Model No:</td>
<td colspan="2"><span id="spryModel">
<label for="Model3"></label>
<input name="Model" type="text" id="Model3" size="20" />
<span class="textfieldRequiredMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">Speed Range:</td>
<td colspan="2"><span id="sprytextfield18">
<label for="MinSpeed"></label>
<input name="MinSpeed" type="text" id="MinSpeed" size="10" />
<span class="textfieldRequiredMsg">*</span></span> - <span id="spryMaxSpeed">
<label for="MaxSpeed"></label>
<input name="MaxSpeed" type="text" id="MaxSpeed" size="10" />
<span class="textfieldRequiredMsg">*</span></span> ft/sec</td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">Input Voltage:</td>
<td colspan="2"><span id="spryInputVoltage">
<label for="InputVoltage"></label>
<select name="InputVoltage" id="InputVoltage">
<option> </option>
<option value="200-240 VAC Input">200-240 VAC Input</option>
<option value="380-500 VAC Input">380-500 VAC Input</option>
<option value="525-690 VAC Input">525-690 VAC Input</option>
</select>
<span class="selectRequiredMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">Input Phase:</td>
<td colspan="2"><span id="spryInputPhase">
<select name="InputPhase" id="InputPhase">
<option> </option>
<option value="Single Phase">Single Phase</option>
<option value="Three Phase">Three Phase</option>
</select>
<span class="selectRequiredMsg">*</span></span></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">Frequency:</td>
<td colspan="2"><span id="spryFrequency">
<label for="Frequency"></label>
<input name="Frequency" type="text" id="Frequency" size="10" />
<span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> Hz</td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">kW:</td>
<td colspan="2"><span id="sprykW">
<label for="kW"></label>
<input name="kW" type="text" id="kW" size="10" />
<span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">HP:</td>
<td colspan="2"><span id="spryHP">
<label for="HP"></label>
<input name="HP" type="text" id="HP" size="5"/>
<span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">kVA:</td>
<td colspan="2"><span id="sprykVA">
<label for="kVA"></label>
<input name="kVA" type="text" id="kVA" size="5" width="75"/>
<span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">Amps:</td>
<td colspan="2"><span id="spryAmps">
<label for="Amps3"></label>
<input name="Amps" type="text" id="Amps3" size="5" width="75"/>
<span class="textfieldRequiredMsg">*</span><span class="textfieldInvalidFormatMsg">Invalid format.</span> </span></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right"> </td>
<td colspan="2"> </td>
</tr>
</table>
<table width="640" border="0" cellpadding="2" align="center">
<tr>
<td height="32" colspan="5" align="left"><strong>OPTIONS</strong></td>
</tr>
<tr>
<td width="14"> </td>
<td colspan="4" align="left">Enclosure & Environment Options:</td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td width="237"><input type="checkbox" name="Shield" id="Shield" />
<label for="Shield">Sun/Snow Sheild</label></td>
<td width="15"> </td>
<td width="327"><input type="checkbox" name="ColdKit" id="ColdKit" />
<label for="ColdKit">Cold Weather Kit (-40 to -50 °C)</label></td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td><input type="checkbox" name="WallStand" id="WallStand" />
<label for="WallStand">Wall Mounting Stand</label></td>
<td> </td>
<td><input type="checkbox" name="HeatKit" id="HeatKit" />
<label for="HeatKit">Heat Trace Kit</label></td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td><input type="checkbox" name="FloorBase" id="FloorBase" />
<label for="FloorBase">Floor Mounting Base</label></td>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td width="15" align="left"> </td>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="left">Input:</td>
<td colspan="2">Output:</td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td><input type="checkbox" name="PowerKit" id="PowerKit" />
<label for="PowerKit">Power Terminal Kit.</label></td>
<td> </td>
<td><input type="checkbox" name="MotorKit" id="MotorKit" />
<label for="MotorKit">Motor Terminal Kit</label></td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td><input type="checkbox" name="Harmonic" id="Harmonic" />
<label for="Harmonic">Harmonic Filter Enclosure</label></td>
<td> </td>
<td><input type="checkbox" name="SineFilter" id="SineFilter" />
<label for="SineFilter">Sine Filter Enclosure</label></td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="left"> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="left">VFD:</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td colspan="3"><input type="checkbox" name="Fieldbus" id="Fieldbus" />
<label for="Fieldbus">Fieldbus Networks</label></td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td colspan="3"><input type="checkbox" name="ControlKit" id="ControlKit" />
<label for="ControlKit">Control Terminal Kit</label></td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td colspan="3"><input type="checkbox" name="General" id="General" />
<label for="General">General Purpose I/O, 3DI, 2DO, 2AI, 1AO</label></td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td colspan="3"><input type="checkbox" name="Relay" id="Relay" />
<label for="Relay">Relay Option, 3RO, 240Vac, 2A</label></td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td colspan="3"><input type="checkbox" name="DCSupply" id="DCSupply" />
<label for="DCSupply">24 V Ext. DC Supply Connector</label></td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="left">Operation & Support:</td>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td align="left"> </td>
<td colspan="3"><input type="checkbox" name="iCM" id="iCM" />
<label for="iCM">SALT iCM (remote access internect control module)</label></td>
</tr>
</table>
<blockquote>
<p align="right">
<input name="Submit" type="submit" id="Submit" value="Submit"/>
</p>
</blockquote>
</form>
PHP:
<?php
$ProjectName = $_POST['ProjectName'];
$Company = $_POST['Company'];
$Address = $_POST['Address'];
$City = $_POST['City'];
$State = $_POST['State'];
$Zip = $_POST['Zip'];
$Country = $_POST['Country'];
$FirstName = $_POST['FirstName'];
$LastName = $_POST['LastName'];
$Phone = $_POST['Phone'];
$Mobile = $_POST['Mobile'];
$Email = $_POST['Email'];
$DriveCity = $_POST['DriveCity'];
$DriveState = $_POST['DriveState'];
$MinTemp = $_POST['MinTemp'];
$MaxTemp = $_POST['MaxTemp'];
$Altitude = $_POST['Altitude'];
$PumpType = $_POST['PumpType'];
$Manufacturer = $_POST['Manufacturer'];
$Model = $_POST['Model'];
$MinSpeed = $_POST['MinSpeed'];
$MaxSpeed = $_POST['MaxSpeed'];
$InputVoltage = $_POST['InputVoltage'];
$InputPhase = $_POST['InputPhase'];
$Frequency = $_POST['Frequency'];
$kW = $_POST['kW'];
$HP = $_POST['HP'];
$kVA = $_POST['kVA'];
$Amps = $_POST['Amps'];
$Shield = $_POST['Shield'];
$WallStand = $_POST['WallStand'];
$FloorBase = $_POST['FloorBase'];
$ColdKit = $_POST['ColdKit'];
$HeatKit = $_POST['HeatKit'];
$PowerKit = $_POST['PowerKit'];
$Harmonic = $_POST['Harmonic'];
$MotorKit = $_POST['MotorKit'];
$SineFilter = $_POST['SineFilter'];
$Fieldbus = $_POST['Fieldbus'];
$ControlKit = $_POST['ControlKit'];
$General = $_POST['General'];
$Relay = $_POST['Relay'];
$DCSupply = $_POST['DCSupply'];
$iCM = $_POST['iCM'];
//Sending Email to form owner
$header = "From: $Email\n"
. "Reply-To: $Email\n";
$subject = "SALT RFQ";
$email_to = "sales#pmcsalt.com";
$message = "Project Name: $ProjectName\n" . "Company: $Company\n" . "Address: $Address\n" . "City: $City\n" . "State: $State\n" . "Zip: $Zip\n" . "Country: $Country\n" . "First Name: $FirstName\n" . "Last Name: $LastName\n" . "Phone: $Phone\n" . "Mobile: $Mobile\n" . "Email: $Email\n" .
"Drive City: $DriveCity\n" .
"Drive State: $DriveState\n" .
"Min Temp: $MinTemp\n" .
"Max Temp: $MaxTemp\n" .
"Altitude: $Altitude\n" .
"Application Type: $PumpType\n" .
"Manufacturer: $Manufacturer\n" .
"Model: $Model\n" .
"MinSpeed: $MinSpeed\n" .
"MaxSpeed: $MaxSpeed\n" .
"InputVoltage: $InputVoltage\n" .
"InputPhase: $InputPhase\n" .
"kW: $kW\n" .
"HP: $HP\n" .
"kVA: $kVA\n" .
"Amps: $Amps\n" .
"Sun/Snow Shield: $Shield\n" .
"Wall Mounting Stand: $WallStand\n" .
"Floor Mounting Base: $FloorBase\n" .
"Cold Weather Kit: $ColdKit\n" .
"Heat Trace Kit: $HeatKit\n" .
"Power Terminal Kit: $PowerKit\n" .
"Harmonic Filter Enclosure: $Harmonic\n" .
"Motor Terminal Kit: $MotorKit\n" .
"Sine Filter Enclosure: $SineFilter\n" .
"Fieldbus Networks: $Fieldbus\n" .
"Control Terminal Kit: $ControlKit\n" .
"General Purpose I/O, 3DI, 2DO, 2AI, 1AO: $General\n" .
"Relay Option, 3RO, 240Vac, 2A: $Relay\n" .
"24 V Ext. DC Supply Connector: $DCSupply\n" .
"SALT iCM: $iCM\n" .
mail($email_to, $subject ,$message ,$header ) ;
//Sending Confirmation Email to Client
$header = "From: sales#pmcsalt.com\n"
. "Reply-To: sales#pmcsalt.com\n";
$subject = "SALT RFQ";
$email_to = "$Email";
$message = "Dear $FirstName $LastName,\n \n We have received your pricing request for $ProjectName. One of our sales representatives will be with you within 48 hours to discuss pricing for your custom application.\n \n Thank you for chosing Power Management Controls!! \n \n \n";
mail($email_to, $subject ,$message ,$header ) ;
?>
You're not terminating your concatentation properly:
"24 V Ext. DC Supply Connector: $DCSupply\n" .
"SALT iCM: $iCM\n" .
mail($email_to, $subject ,$message ,$header ) ;
This should be:
24 V Ext. DC Supply Connector: $DCSupply\n" .
"SALT iCM: $iCM\n";
mail($email_to, $subject ,$message ,$header ) ;
At the moment, you've not got anything in $message at the point where you're calling mail().

Categories