how to print same value as entered in above textbox - php

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>

Related

Continously display textboxes per row in a table if a button is clicked

Hi pls help me with this. I created text boxes with names qty, serialno and description respectively in a row of a table. right after the text box description, i put a plus button that will display another text boxes below which is the same with the first ones. My problem is how can I continuously add up to 10 maximum rows of text boxes. Any help will do thanks!
Here is my markup:
<table>
<tr>
<td width="6"></td>
<td align="left" width="3">Quantity<font color="#990000">* </font><input id=
"qty" name="qty" type="text"></td>
<td width="8">S/N<font color="#990000">* </font><input id="serialno" name=
"serialno" type="text"></td>
<td width="140">Desription<font color="#990000">*</font></td>
<td><input id="desc" name="desc" required="required" type="text"></td>
<td align="left" width="8"><button id="addreturn">+</button></td>
</tr>
<tr id="returnplus">
<td id="returnplus" width="6"></td>
<td align="left" id="returnplus" width="3">Quantity<font color=
"#990000">* </font><input id="qty2" name="qty2" type="text"></td>
<td id="returnplus" width="8">S/N<font color="#990000">* </font><input id=
"serialno2" name="serialno2" type="text"></td>
<td id="returnplus" width="140">Desription<font color="#990000">*</font></td>
<td id="returnplus"><input id="desc2" name="desc2" type="text"></td>
</tr>
Here's the javascript:
< script >
$(document).ready(function() {
$("#returnplus").hide();
$("#addreturn").click(function() {
$("#returnplus").show("slow");
});
});
< /script>
Below code will generate textbox elemets mentioned in htmlvalue upon clicking + button.
var count = 1 ;
$("#addreturn").click( function (e) {
var htmlvalue = ' var htmlvalue = '<br>
<br> ';
<table>
<tr>
<td align="left" width="3">
Quantity* <input id="qty" name="qty" type="text">
</td>
<td width="8">
S/N* <input id="serialno" name="serialno" type="text">
</td>
<td width="140">
Desription*
</td>
<td>
<input id="desc" name="desc" required="required" type="text">
</td>
<td align="left" width="8"></td>
</tr>
</table>';
if(count <= 10)
$("body").append(htmlvalue);
else
e.preventDefault();
count = count + 1;
});
});
Also, Check DEMO FROM HERE
Change yout html and JS. replace id by class
<table>
<tr>
<td width="6"></td>
<td width="3" align="left">Quantity<font color="#990000">* </font><input type="text" name="qty" id="qty" />
<td width="8">S/N<font color="#990000">* </font><input type="text" name="serialno" id="serialno" />
<td width="140" >Desription<font color="#990000">*</font></td>
<td><input type="text" name="desc" id="desc" required= "required"/></td>
<font color="#990000"></font>
</td>
<td width="8" align="left"><button id="addreturn">+</button></td>
</tr>
<tr class="returnplus">
<td width="6"></td>
<td width="3" align="left">Quantity<font color="#990000">* </font><input type="text" name="qty2" id="qty2"/>
<td width="8">S/N<font color="#990000">* </font><input type="text" name="serialno2" id="serialno2" />
<td width="140">Desription<font color="#990000">*</font></td>
<td><input type="text" name="desc2" id="desc2" /></td>
</tr>
</table>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('.returnplus').hide();
$('#addreturn').click(function(){
$('.returnplus').show();
});
});
</script>

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.

how to get the value for my html email form?

Ihave this code that send an email with attachmant and its was working fine, but i did change the message body to have an email with a form look the problem i can't get the data to be showen in mt text box
$rowSQL = mysql_query( "SELECT MAX( ID ) AS max FROM `consulta` ;" );
$row = mysql_fetch_array( $rowSQL );
$largestNumber = $row['max'];
//echo $largestNumber;
$allData = mysql_query("SELECT * FROM `consulta` WHERE ID = $largestNumber;" );
while($rows = mysql_fetch_array($allData)) {
$email =$rows['EMAIL'];
$depto = $rows['N_DPTO'];
// NEW
$nombre = $rows['NOMBRE1'];
$apeellido = $rows['APELLIDO1'];
$dni = $rows['DNI'];
$phone = $rows['TELF'];
$direccion = $rows['DIRECCION'];
$date = $rows['DATE'];
$refrencia = $rows['REFERENCIA'];
$nestac = $rows['N_ESTACIONAMIENTO'];
$deposito = $rows['N_DEPOSITO'];
$dptoprice = $rows['P_DPTO'];
$esprice = $rows['P_ESTACIONAMIENTO'];
$depoprice = $rows['P_DEPOSITO'];
$separacion = $rows['SEPARACION'];
$cuota = $rows['CUOTA'];
$montofin = $rows['MONTO_FIN'];
$entidadfin = $rows['ENTIDAD_FIN'];
$observacion = $rows['OBSERVACIONES'];
$ncotizacion = $rows['N_COTIZACION'];
$user = $rows['USER_ID'];
// END NEW
echo $email;
echo $depto;
}
and the HTML message :
$message = '<html>
<body>
<table width="639" border="0">
<tr>
<td height="38" colspan="6"><h2>Gracias por tu visita
<label for="dpto"></label>
</h2></td>
</tr>
<tr>
<td width="148">Depto</td>
<td width="144"><input name="dpto" type="text" id="dpto" value="<?php echo $depto;?>" /></td>
<td width="3"> </td>
<td width="8"> </td>
<td width="136">Vendedor</td>
<td width="174" nowrap="nowrap"><label for="cotizacion">
<input name="user" type="text" id="user" value="" />
</label></td>
</tr>
<tr>
<td>Fecha</td>
<td><label for="esta">
<input name="date" type="text" id="date" value="$" />
</label></td>
<td> </td>
<td> </td>
<td>Documento</td>
<td nowrap="nowrap"><label for="deposito">
<input name="cotizacion" type="text" id="cotizacion" value="$" />
</label></td>
</tr>
<tr>
<td>Estacionamiento</td>
<td><input name="esta" type="text" id="esta" value="$" /></td>
<td> </td>
<td> </td>
<td>Deposito</td>
<td nowrap="nowrap"><input name="deposito" type="text" id="deposito" value="$" /></td>
</tr>
<tr>
<td height="64" colspan="6" valign="middle"><h2>Datos Del Cliente</h2></td>
</tr>
<tr>
<td>Nombre</td>
<td><input name="name" type="text" id="name2" value="$" /></td>
<td> </td>
<td> </td>
<td>Apellido</td>
<td nowrap="nowrap"><input name="family" type="text" id="family" value="$" /></td>
</tr>
<tr>
<td>DNI</td>
<td><input name="dni" type="text" id="dni" value="$" /></td>
<td> </td>
<td> </td>
<td> </td>
<td nowrap="nowrap"> </td>
</tr>
<tr>
<td height="32">Telf</td>
<td><input name="telf" type="text" id="telf" value="$" /></td>
<td> </td>
<td> </td>
<td>Email</td>
<td nowrap="nowrap"><input name="email" type="text" id="email" value="$" /></td>
</tr>
<tr>
<td>Direccion</td>
<td colspan="5"><input name="address" type="text" id="address" value="$" size="74" /></td>
</tr>
<tr>
<td>Como se Entero</td>
<td colspan="5"><input name="como" type="text" id="como" value="$" size="74" /></td>
</tr>
<tr>
<td height="56" colspan="6"><h2>Datos Financieros</h2></td>
</tr>
<tr>
<td>Precio Dpto S/.</td>
<td><input name="pDpto" type="text" id="pDpto" value="$" /></td>
<td> </td>
<td> </td>
<td>Precio Estacio S/.</td>
<td nowrap="nowrap"><input name="pEsta" type="text" id="pEsta" value="$" /></td>
</tr>
<tr>
<td>Precio Deposito S/.</td>
<td><input name="pDeposito" type="text" id="pDeposito" value="$" /></td>
<td> </td>
<td> </td>
<td>Separacion S/.</td>
<td nowrap="nowrap"><input name="separacion" type="text" id="separacion" value="$" /></td>
</tr>
<tr>
<td>Cuota S/.</td>
<td><input name="couta" type="text" id="couta" value="$" /></td>
<td> </td>
<td> </td>
<td>Monto Financia</td>
<td nowrap="nowrap"><input name="monto" type="text" id="monto" value="$" /></td>
</tr>
<tr>
<td>Entidad Financia</td>
<td><input name="entidad" type="text" id="entidad" value="$" /></td>
<td> </td>
<td> </td>
<td> </td>
<td nowrap="nowrap"> </td>
</tr>
<tr>
<td>Observaciones</td>
<td colspan="5"><textarea name="oserv" id="oserv" cols="58" rows="5"></textarea></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td nowrap="nowrap"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td nowrap="nowrap"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td nowrap="nowrap"> </td>
</tr>
</table>
</body>
</html>';
i do get the form look email but in the textbox i get so how can i have to show the value in the text box ???
The html form is a php string so you will have to end it to display the php value:
<input name="dpto" type="text" id="dpto" value="'.$depto.'" />
notice the single quote and dot before the variable $depto then the dot and single quote after. when you output the $message variable it will output the value of $depto
You need to reference the variables that contain the text you want to display, and because you're using single quotes instead of double quotes you have to close the quotes on your $message and use the single dot to join the variable with your text, like this:
<textarea name="oserv" id="oserv" cols="58" rows="5">'.$oserv.'</textarea>
Or:
<input name="date" type="text" id="date" value="'.$date.'" />
For future reference, if you used double quotes, you could reference the variables like this (but you'd need to escape all double quotes in your string with a \):
$message = "<input name=\"date\" type=\"text\" id=\"date\" value=\"{$date}\" />";

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 >

Getting checkbox values to appear in email with 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.

Categories