<?php
$sql="select * from ty_listdetail where id_job='$_GET[apply]'";
$q=mysql_query($sql) or die (mysql_error());
//echo $sql;
while($rec=mysql_fetch_assoc($q)){
?>
<br />
<div id="maincontent">
<div id="title">
<p>Toscana Valley Co.,Ltd. And Valley Group Compant<br>
The Application is part of the consideration, Please fill out Completely.</p>
</div><br>
<div id="resume">
<form action="application.php" method="post" name="application_from" target="_parent" enctype="multipart/form-data">
<p>Resume : <input name="resume_file" type="file" size="30"></p>
</div>
<div id="salary">
<p>Experted Salary : <input name="expec_salary" type ="text" size="20" maxlength="6"> Apply Position : <strong><?=$rec['position'];?></strong></p>
</div>
<?php }//while ?>
<div id="personal">
<p><img src="p/personal background.png" width="900" height="44" /></p>
</div>
<div id="bg">
<div id="personal_bg">
<div id="personal_layout">
<ul>
<li> </li>
</ul>
<ul>
<li>
Prefix :
<select name="prefix.">
<option value=""></option>
<option value="Mr">Mr.</option>
<option value="Ms">Ms.</option>
<option value="Mrs">Mrs.</option>
</select>
</li>
<li>Name : <input name="txt_name" type="text" size="30" /></li>
<li>Surname : <input name="txt_surname" type="text" size="30" /></li>
</form>
</div>
ไฟล์ application.php Code (PHP)
$sql="insert into ty_application(id_job,experted_salary,resume_file,prefix,name,surname)values('$_POST[expec_salary]', '$_POST[resume_file]','$_POST[prefix]','$_POST[txt_name]','$_POST[txt_surname]') where id='$_GET[apply]' ";
$q=mysql_query($sql) or die (mysql_error());
$sql="insert into ty_application(id_job,experted_salary,resume_file,prefix,name,surname)values('$_POST[expec_salary]', '$_POST[resume_file]','$_POST[prefix]','$_POST[txt_name]','$_POST[txt_surname]') where id='$_GET[apply]' ";
$q=mysql_query($sql) or die (mysql_error());
$id = mysql_insert_id();
header("location:webpage.php?id=".$id);