select option not displaying correctly after .load ajax - php

I am loading a php page into a spefific div, using this code
function peopleEdit(id, currid) {
$("#people_edit").load( "people_edit.php?id="+currid );
return false;
}
There are 2 issues though.
the form displayed, has the option values out of the select box, and the option is not working.
the tinymce box is displayed but the data are out of the box.
the form is tested and is working properly before the ajax .load
here's the html of the form.
<form action="people.php" enctype="multipart/form-data" name="pelatesForm" id="pelatesForm" method="post">
<table width="90%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td width="20%" align="right">Τύπος</td>
<td width="80%"><label>
<select name="pelates_type_det" id="pelates_type_det" />
<option value="<?php echo $pelates_det_type ?>"><?php echo $pelates_det_type ?></option>
<option value="Πελάτης">Πελάτης</option>
<option value="Προμηθευτής">Προμηθευτής</option>
</select>
</label></td>
</tr>
<tr>
<td width="20%" align="right">Όνομα</td>
<td width="80%"><label>
<input name="pelates_first_name_det" type="text" id="pelates_first_name_det" size="64" value="<?php echo $pelates_det_first_name ?>" />
</label></td>
</tr>
<tr>
<td width="20%" align="right">Επίθετο</td>
<td width="80%"><label>
<input name="pelates_last_name" type="text" id="pelates_last_name" size="64" value="<?php echo $pelates_det_last_name ?>" />
</label></td>
</tr>
<tr>
<td width="20%" align="right">Τηλέφωνο - Σταθερό</td>
<td width="80%"><label>
<input name="pelates_phone" type="text" id="pelates_phone" size="64" value="<?php echo $pelates_det_phone ?>" />
</label></td>
</tr>
<tr>
<td width="20%" align="right">Τηλέφωνο - Κινητό</td>
<td width="80%"><label>
<input name="pelates_cell" type="text" id="pelates_cell" size="64" value="<?php echo $pelates_det_cell ?>" />
</label></td>
</tr>
<tr>
<td width="20%" align="right">Email</td>
<td width="80%"><label>
<input name="pelates_email" type="text" id="pelates_email" size="64" value="<?php echo $pelates_det_email ?>" />
</label></td>
</tr>
<tr>
<td width="20%" align="right">Όνομα εταιρείας - Ιδιώτης</td>
<td width="80%"><label>
<input name="pelates_company" id="pelates_company" size="64" value="<?php echo $pelates_det_company ?>" />
</label>
</td>
</tr>
<tr>
<td width="20%" align="right">ΑΦΜ</td>
<td width="80%"><label>
<input name="pelates_afm" type="text" id="pelates_afm" size="64" value="<?php echo $pelates_det_afm ?>" />
</label></td>
</tr>
<tr>
<td width="20%" align="right">ΔΟΥ</td>
<td width="80%"><label>
<input name="pelates_doy" type="text" id="pelates_doy" size="64" value="<?php echo $pelates_det_doy ?>" />
</label></td>
</tr>
<tr>
<td width="20%" align="right">Διεύθυνση</td>
<td width="80%"><label>
<input name="pelates_address" type="text" id="pelates_address" size="64" value="<?php echo $pelates_det_address ?>" />
</label></td>
</tr>
<tr>
<td width="20%" align="right">Ταχυδρομικός κώδικας</td>
<td width="80%"><label>
<input name="pelates_tk" type="text" id="pelates_tk" size="64" value="<?php echo $pelates_det_tk ?>" />
</label></td>
</tr>
<tr>
<td width="20%" align="right">Περιοχή</td>
<td width="80%"><label>
<input name="pelates_area" type="text" id="pelates_area" size="64" value="<?php echo $pelates_det_area ?>" />
</label></td>
</tr>
<tr>
<td width="20%" align="right">Σχόλια</td>
<td width="80%">
<textarea name="pelates_comments_det" type="text" class="tinymce" id="pelates_comments_det" size="64" /><?php echo $pelates_det_comments ?></textarea>
</td>
</tr>
<tr>
<td> </td>
<td><label>
<input name="thisID" type="hidden" value="<?php echo $targetID ?>" />
<input type="submit" name="submitpel" id="submitpel" value="Υποβολή" />
<input type="button" value="Άκυρο" onclick="return epistrofi('people_detailed','<?php echo $targetID ?>');" />
</label>
</td>
</tr>
</table>
</form>
any ideas of why is this happening?

You close your select :
<select name="pelates_type_det" id="pelates_type_det" />
Change to:
<select name="pelates_type_det" id="pelates_type_det">

Related

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 >

Saving a form with text and checboxes to text file

I an working on a HTML form to help me keep track on information when I play roll playing games.
The form has a grid of checkboxes that are used to track health. I also have a text box that I track other stats in.
I want to have a 2 buttons: LOAD and SAVE.
When save is hit the current status (whether or not a box is marked), if every form element is saved to a text file Save/save.txt. Any information in a existing text file should be replaced. I only care about the current settings.
when load is hit the data is loaded from the text file and the form is filled out like it was when it was saved.
How do I get this form to save / load?
<form action="HP_Tracker.php" method="post">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><center><b>W</b></center></td>
<td> </td>
</tr>
<tr>
<td bgcolor="ffffff"><input name="W1" type="checkbox" value="" /></td>
<td bgcolor="000000"><input name="S24" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="ffffff"><input name="W2" type="checkbox" value="" /></td>
<td bgcolor="000000"><input name="S23" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="F0F0F5"><input name="W3" type="checkbox" value="" /></td>
<td bgcolor="0A0A0F"><input name="S22" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="E0E0EB"><input name="W4" type="checkbox" value="" /></td>
<td bgcolor="14141F"><input name="S21" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="D1D1E0"><input name="W5" type="checkbox" value="" /></td>
<td bgcolor="1F1F2E"><input name="S20" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="C2C2D6"><input name="W6" type="checkbox" value="" /></td>
<td bgcolor="29293D"><input name="S19" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="B2B2CC"><input name="W7" type="checkbox" value="" /></td>
<td bgcolor="33334C"><input name="S18" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="A3A3C2"><input name="W8" type="checkbox" value="" /></td>
<td bgcolor="3D3D5C"><input name="S17" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="9494B8"><input name="W9" type="checkbox" value="" /></td>
<td bgcolor="47476B"><input name="S16" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="8585AD"><input name="W10" type="checkbox" value="" /></td>
<td bgcolor="52527A"><input name="S15" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="7575A3"><input name="W11" type="checkbox" value="" /></td>
<td bgcolor="5C5C8A"><input name="S14" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="666699"><input name="W12" type="checkbox" value="" /></td>
<td bgcolor="666699"><input name="S13" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="5C5C8A"><input name="W13" type="checkbox" value="" /></td>
<td bgcolor="7575A3"><input name="S12" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="52527A"><input name="W14" type="checkbox" value="" /></td>
<td bgcolor="8585AD"><input name="S11" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="47476B"><input name="W15" type="checkbox" value="" /></td>
<td bgcolor="9494B8"><input name="S10" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="3D3D5C"><input name="W16" type="checkbox" value="" /></td>
<td bgcolor="A3A3C2"><input name="S9" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="33334C"><input name="W17" type="checkbox" value="" /></td>
<td bgcolor="B2B2CC"><input name="S8" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="29293D"><input name="W18" type="checkbox" value="" /></td>
<td bgcolor="C2C2D6"><input name="S7" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="1F1F2E"><input name="W19" type="checkbox" value="" /></td>
<td bgcolor="D1D1E0"><input name="S6" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="14141F"><input name="W20" type="checkbox" value="" /></td>
<td bgcolor="E0E0EB"><input name="S5" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="0A0A0F"><input name="W21" type="checkbox" value="" /></td>
<td bgcolor="F0F0F5"><input name="S4" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="000000"><input name="W22" type="checkbox" value="" /></td>
<td bgcolor="FFFFFF"><input name="S3" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="000000"><input name="W23" type="checkbox" value="" /></td>
<td bgcolor="FFFFFF"><input name="S2" type="checkbox" value="" /></td>
</tr>
<tr>
<td bgcolor="000000"><input name="W24" type="checkbox" value="" /></td>
<td bgcolor="FFFFFF"><input name="S1" type="checkbox" value="" /></td>
</tr>
<tr>
<td> </td>
<td><center><b>S</b></center></td>
</tr>
</table>
<hr />
Initiative<br />
<input name="Initiative" type="text" size="4" />
<br /><br />
<input name="Save" type="submit" value="SAVE" />
</form>
Try that:
<?php
if (!empty($_POST)) {
$data = implode(',', $_POST);
$fileName = 'yourFile.txt';
$file = fopen($fileName, 'a+');
fwrite($file, $data);
fclose($file);
chmod(0777);
}

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.

table cuts off page after 2nd <td>

I don't know why but my table cuts off right after the second <td> tag... can anyone help, I have constantly looked over it over and over. Can someone help me find where the problem is?
<tr>
<td>Username:</td>
<td>
<input name="username" type="text" value='<?
if($form->value("username")==""){
echo($req_user_info["username"]);
}else{
echo $form->value("username");
}
?>' size="56" maxlength="30">
</td>
<td>
<? echo($form->error("username")); ?>
</td>
</tr>
<tr>
<td>New Password:</td>
<td>
<input name="newpass" type="password" value='<?
echo($form->value("newpass"));
?>' size="56" maxlength="30">
</td>
<td>
<? echo($form->error("newpass")); ?>
</td>
</tr>
Btw, that code is only the first two rows.
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
?>
<form action="adminprocess.php" method="POST">
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr>
<td>Username:</td>
<td>
<input name="username" type="text" value='<?php
if($form->value("username")==""){
echo($req_user_info["username"]);
}else{
echo $form->value("username");
}
?>' size="56" maxlength="30">
</td>
<td>
<?php echo($form->error("username")); ?>
</td>
</tr>
<tr>
<td>New Password:</td>
<td>
<input name="newpass" type="password" value='<?php
echo($form->value("newpass"));
?>' size="56" maxlength="30">
</td>
<td>
<?php echo($form->error("newpass")); ?>
</td>
</tr>
<tr>
<td>Confirm New Password:</td>
<td><input name="conf_newpass" type="password" value='
<?php echo $form->value("newpass"); ?>' size="56" maxlength="30"></td>
<td><?php echo $form->error("newpass"); ?></td>
</tr>
</tr>
<td>Edit motto:</td>
<td><input type="text" size="56" name="motto" value='<?php
if($form->value("motto") == ""){
echo $req_user_info['motto'];
}else{
echo $form->value("motto");
}
?>'></td>
<tr>
<tr>
<td>Edit profile bio:</td>
<td><textarea cols="40" rows="10" name="profile" value=""><?php
if($form->value("profile") == ""){
echo $req_user_info['profile'];
}else{
echo $form->value("profile");
}
?></textarea></td>
<tr>
<tr>
<td>Email:</td>
<td><input name="email" type="text" value='
<?php
if($form->value("email") == ""){
echo $req_user_info["email"];
}else{
echo $form->value("email");
}
?>' size="56" maxlength="50">
</td>
<td><?php echo $form->error("email"); ?></td>
</tr>
<tr>
<td>User level:</td>
<td><input name="userlevel" type="text" value='
<?php
if($form->value("userlevel") == ""){
echo $req_user_info["userlevel"];
}else{
echo $form->value("userlevel");
}
?>' size="4" maxlength="10"></td>
<td><?php echo $form->error("userlevel"); ?></td>
</tr>
<tr><td align="right">
<input type="hidden" name="subedit" value="1">
<input type="hidden" name="usertoedit" value="<?php echo $usertoedit; ?>">
<input type="submit" name="button" value="Edit Account">
</td>
<td colspan="2" style="text-align:right;">
<input type="submit" name="button" value="Delete" onclick="return confirm ('Are you sure you want to delete this user, this cannot be undone?\n\n' + 'Click OK to continue or Cancel to Abort!')">
</td>
</tr>
</table>
</form>
I've changed your syntax a little..
<tr>
<td>Username:</td>
<td><input name="username" type="text" value="<?php echo htmlspecialchars(($form->value("username")=="" ? $req_user_info["username"] : $form->value("username"))); ?>" size="56" maxlength="30"></td>
<td><?php echo $form->error("username"); ?></td>
</tr>
<tr>
<td>New Password:</td>
<td><input name="newpass" type="password" value="<?php echo htmlspecialchars($form->value("newpass")); ?>" size="56" maxlength="30"></td>
<td><?php echo $form->error("newpass"); ?></td>
</tr>
For additional php error logging, put this at the top of the page:
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
?>

Messed up HTML/CSS design [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I'm just checking other people's works and Im fixing this design and I can't seem to have an idea on how to fix it. I don't want to change anything from the css so is it possible to just arrange it on html?
<!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=iso-8859-1" />
<title>Clinical Module</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="inc/style.css" type="text/css">
</head>
<body>
<form action='' method='POST'><center>
<input type="text" placeholder="Patient Number" name="search" > <input type="submit" Value="Check" name='submit'> <br>
<?php
mysql_connect("localhost","root","");
mysql_select_db("invoices");
$search = 0;
$search=$_POST['search'];
if (isset($_POST['submit'])){
$query = "select * from `patient` where `clientid` = $search ";
$result=mysql_query($query);
while($row = mysql_fetch_array($result)){ ?>
First name:<br>
</td>
<td valign="top" align="left">
<input type="text" size="20" name="first_name" value="<?php echo $row["first_name"]?>" ></td>
<td valign="top" width="10%" rowspan="13">
</td>
</tr>
<tr>
<td valign="top" align="right">
Middle name:</td>
<td valign="top" align="left">
<input type="text" size="20" name="middle_name" value="<?php echo $row["middle_name"]?>" ></td>
</td>
</tr>
<tr>
<td valign="top" align="right">
Last Name:
</td>
<td valign="top" align="left">
<input type="text" name="last_name" size="20" value="<?php echo $row["last_name"]?>"></td>
</tr>
<tr>
<td valign="top" align="right">
Birthdate
</td>
<td valign="top" align="left">
<input type="text" name="Birthdate" size="20" value="<?php echo $row["birthdate"]; ?>"></td>
</tr>
<tr>
<td valign="top" align="right">
Age
</td>
<td valign="top" align="left">
<input readonly type="text" name="age" size="20" value="<?php echo $row["age"]?>" placeholder="YYYY-MM-DD"></td>
</tr>
<tr>
<td valign="top" align="right"> Gender:</td>
<td valign="top" align="left"><select name="gender">
<? if ($row["gender"]==Male) { ?>
<option value="Male" selected>Male</option>
<option value="Female">Female</option>
<? }else if ($row["gender"]==Female) { ?>
<option value="Male" >Male</option>
<option value="Female" selected>Female</option> <?php }?>
</select></tr>
</td><tr>
<td valign="top" align="right"> Civil Status:</td>
<td valign="top" align="left"><select name="civil_status">
<? if ($row["civil_status"]==Single) { ?>
<option value="Single" selected >Single</option>
<option value="Married">Married</option>
<option value="Separatede">Separated</option>
<option value="Widowed">Windowed</option>
<? }else if ($row["civil_status"]==Married) { ?>
<option value="Single" >Single</option>
<option value="Married" selected>Married</option>
<option value="Separated">Separated</option>
<option value="Widowed">Windowed</option>
<? }else if ($row["civil_status"]==Separated) { ?>
<option value="Single" >Single</option>
<option value="Married">Married</option>
<option value="Separated" selected>Separated</option>
<option value="Widowed">Windowed</option>
<? }else if ($row["civil_status"]==Widowed) { ?>
<option value="Single" >Single</option>
<option value="Married">Married</option>
<option value="Separated">Separated</option>
<option value="Widowed" selected>Windowed</option> <?php }?>
</select>
</td>
</tr>
<tr>
<td valign="top" align="right" nowrap>
Address:</td>
<td valign="top" align="left">
<input type="text" name="address" value="<?php echo $row["address"]?>" size="31"></td>
</tr>
<tr>
<td valign="top" align="right">
Tel. no.:</td>
<td valign="top" align="left">
<input
type="text" size="20" name="telno" placeholder="###-####" value="<?php echo $row["telno"]?>"></td></tr>
<tr>
<td valign="top" align="right">
Occupation:</td>
<td valign="top" align="left">
<input
type="text" size="20" name="occ" value="<?php echo $row["occ"]?>"></td></tr>
<tr>
<td align="right">
Spouse:</td>
<td >
<input
type="text" size="20" name="spo" value="<?php echo $row["spo"]?>"></td></tr><tr>
<td align="right">
Occupation:</td>
<td >
<input
type="text" size="20" name="occ2" value="<?php echo $row["occ2"]?>"></td></tr>
<tr>
<td align="right" width="20">
Contact Person(in case of emergency):</td>
<td >
<input
type="text" size="20" name="cp" value="<?php echo $row["cp"]?>"></td></tr><tr>
<td align="right">
Tel. no:</td>
<td >
<input
type="text" size="20" name="tel2" value="<?php echo $row["tel2"]?>"></td></tr>
<tr>
<td valign="top" align="right" nowrap>
Reffered By:</td>
<td valign="top" align="left">
<input type="text" name="reff" value="<?php echo $row["reff"]?>" size="31" ></td>
</tr>
<tr>
<td class=topHeadrow1 valign="middle" width="50%" colspan="2">
Past Medical History:</td>
</tr>
<tr>
<td valign="top" align="right" nowrap>
Allergy:</td>
<td valign="top" align="left">
<input type="text" name="all" value="<?php echo $row["all"]?>" size="31"></td>
</tr>
<tr>
<td valign="top" align="right" nowrap>
Previous illness:</td>
<td valign="top" align="left">
<input type="text" name="ill" value="<?php echo $row["ill"]?>" size="31"></td>
</tr>
<tr>
<td class=topHeadrow1 valign="middle" width="50%" colspan="2">
<b><font size="4">
Heredo-Familial Diseases:</font></b></td>
</tr>
<tr>
<td valign="top" align="right" nowrap>
Maternal:
</td>
<td valign="top" align="left">
<input type="text" name="mat" value="<?php echo $row["mat"]?>" size="20"></td>
</tr>
<tr>
<td valign="top" align="right" nowrap>
Fraternal:
</td>
<td valign="top" align="left">
<input type="text" name="frat" value="<?php echo $row["frat"]?>" size="20"></td>
</tr>
<? }
}
?>
</center>
</form>
|
I'm not sure if this is what you are referring to, as you've not specified a massive amount of information...
However,
You don't seem to have the actual <table> or </table> tags on this form...
No, opening <tr> tag (as pointed out by Tim Medora Below... Thanks!)...
And also no beginning <td valign="top" align="right"> Before your First name:<br>
<!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=iso-8859-1" />
<title>Clinical Module</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="inc/style.css" type="text/css">
</head>
<body>
<form action='' method='POST'><center>
<input type="text" placeholder="Patient Number" name="search" > <input type="submit" Value="Check" name='submit'> <br>
<table>
<?php
mysql_connect("localhost","root","");
mysql_select_db("invoices");
$search = 0;
$search=$_POST['search'];
if (isset($_POST['submit'])){
$query = "select * from `patient` where `clientid` = $search ";
$result=mysql_query($query);
while($row = mysql_fetch_array($result)){ ?>
<tr>
<td valign="top" align="right">
First name:<br>
</td>
<td valign="top" align="left">
<input type="text" size="20" name="first_name" value="<?php echo $row["first_name"]?>" ></td>
<td valign="top" width="10%" rowspan="13">
</td>
</tr>
<tr>
<td valign="top" align="right">
Middle name:</td>
<td valign="top" align="left">
<input type="text" size="20" name="middle_name" value="<?php echo $row["middle_name"]?>" ></td>
</td>
</tr>
<tr>
<td valign="top" align="right">
Last Name:
</td>
<td valign="top" align="left">
<input type="text" name="last_name" size="20" value="<?php echo $row["last_name"]?>"></td>
</tr>
<tr>
<td valign="top" align="right">
Birthdate
</td>
<td valign="top" align="left">
<input type="text" name="Birthdate" size="20" value="<?php echo $row["birthdate"]; ?>"></td>
</tr>
<tr>
<td valign="top" align="right">
Age
</td>
<td valign="top" align="left">
<input readonly type="text" name="age" size="20" value="<?php echo $row["age"]?>" placeholder="YYYY-MM-DD"></td>
</tr>
<tr>
<td valign="top" align="right"> Gender:</td>
<td valign="top" align="left"><select name="gender">
<? if ($row["gender"]==Male) { ?>
<option value="Male" selected>Male</option>
<option value="Female">Female</option>
<? }else if ($row["gender"]==Female) { ?>
<option value="Male" >Male</option>
<option value="Female" selected>Female</option> <?php }?>
</select></tr>
</td><tr>
<td valign="top" align="right"> Civil Status:</td>
<td valign="top" align="left"><select name="civil_status">
<? if ($row["civil_status"]==Single) { ?>
<option value="Single" selected >Single</option>
<option value="Married">Married</option>
<option value="Separatede">Separated</option>
<option value="Widowed">Windowed</option>
<? }else if ($row["civil_status"]==Married) { ?>
<option value="Single" >Single</option>
<option value="Married" selected>Married</option>
<option value="Separated">Separated</option>
<option value="Widowed">Windowed</option>
<? }else if ($row["civil_status"]==Separated) { ?>
<option value="Single" >Single</option>
<option value="Married">Married</option>
<option value="Separated" selected>Separated</option>
<option value="Widowed">Windowed</option>
<? }else if ($row["civil_status"]==Widowed) { ?>
<option value="Single" >Single</option>
<option value="Married">Married</option>
<option value="Separated">Separated</option>
<option value="Widowed" selected>Windowed</option> <?php }?>
</select>
</td>
</tr>
<tr>
<td valign="top" align="right" nowrap>
Address:</td>
<td valign="top" align="left">
<input type="text" name="address" value="<?php echo $row["address"]?>" size="31"></td>
</tr>
<tr>
<td valign="top" align="right">
Tel. no.:</td>
<td valign="top" align="left">
<input
type="text" size="20" name="telno" placeholder="###-####" value="<?php echo $row["telno"]?>"></td></tr>
<tr>
<td valign="top" align="right">
Occupation:</td>
<td valign="top" align="left">
<input
type="text" size="20" name="occ" value="<?php echo $row["occ"]?>"></td></tr>
<tr>
<td align="right">
Spouse:</td>
<td >
<input
type="text" size="20" name="spo" value="<?php echo $row["spo"]?>"></td></tr><tr>
<td align="right">
Occupation:</td>
<td >
<input
type="text" size="20" name="occ2" value="<?php echo $row["occ2"]?>"></td></tr>
<tr>
<td align="right" width="20">
Contact Person(in case of emergency):</td>
<td >
<input
type="text" size="20" name="cp" value="<?php echo $row["cp"]?>"></td></tr><tr>
<td align="right">
Tel. no:</td>
<td >
<input
type="text" size="20" name="tel2" value="<?php echo $row["tel2"]?>"></td></tr>
<tr>
<td valign="top" align="right" nowrap>
Reffered By:</td>
<td valign="top" align="left">
<input type="text" name="reff" value="<?php echo $row["reff"]?>" size="31" ></td>
</tr>
<tr>
<td class=topHeadrow1 valign="middle" width="50%" colspan="2">
Past Medical History:</td>
</tr>
<tr>
<td valign="top" align="right" nowrap>
Allergy:</td>
<td valign="top" align="left">
<input type="text" name="all" value="<?php echo $row["all"]?>" size="31"></td>
</tr>
<tr>
<td valign="top" align="right" nowrap>
Previous illness:</td>
<td valign="top" align="left">
<input type="text" name="ill" value="<?php echo $row["ill"]?>" size="31"></td>
</tr>
<tr>
<td class=topHeadrow1 valign="middle" width="50%" colspan="2">
<b><font size="4">
Heredo-Familial Diseases:</font></b></td>
</tr>
<tr>
<td valign="top" align="right" nowrap>
Maternal:
</td>
<td valign="top" align="left">
<input type="text" name="mat" value="<?php echo $row["mat"]?>" size="20"></td>
</tr>
<tr>
<td valign="top" align="right" nowrap>
Fraternal:
</td>
<td valign="top" align="left">
<input type="text" name="frat" value="<?php echo $row["frat"]?>" size="20"></td>
</tr>
<? }
}
?>
</table>
</center>
</form>

Categories