รายละเอียดของการตอบ ::
ProfileEdit.php
<?
$objConnect = mysql_connect("localhost","root","1234") or die("Error Connect to Database");
mysql_query("set names 'tis620' ",$objConnect);
$strSQL = "SELECT * FROM employee WHERE em_user = '".$_GET["em_user"]."' ";
$objDB = mysql_select_db("datasps");
$objQuery = mysql_query($strSQL);
$_SESSION = mysql_fetch_array($objQuery);
if(!$_SESSION)
{
echo "Not found em_user=".$_GET["em_user"];
}
else
{
?>
<br />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" height="27"> </td>
<td width="32%"><div align="right" class="style62 style63 style65">
<div align="right">รหัสพนักงาน :</div>
</div></td>
<td width="3%"> </td>
<td width="38%"><div align="left">
<input name="em_user" type="text" id="em_user" value="<?=$_SESSION["em_user"];?>" />
</div></td>
<td width="17%"> </td>
</tr>
<tr>
<td height="28"> </td>
<td><div align="right" class="style62 style63 style65">
<div align="right">รหัสผ่าน :</div>
</div></td>
<td> </td>
<td><div align="left">
<input name="em_pass" type="password" id="em_pass" value="<?=$_SESSION["em_pass"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td height="28"> </td>
<td><div align="right" class="style62 style63 style65">
<div align="right">คำนำหน้า:</div>
</div></td>
<td> </td>
<td><div align="left">
<input name="Em_Title" type="text" id="Em_Title" value="<?=$_SESSION["Em_Title"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td height="30"> </td>
<td><div align="right" class="style62 style63 style65">
<div align="right">ชื่อพนักงาน :</div>
</div></td>
<td> </td>
<td><div align="left">
<input name="Em_Name" type="text" id="Em_Name" value="<?=$_SESSION["Em_Name"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td height="28"> </td>
<td><div align="right" class="style62 style63 style65">ตำแหน่ง :</div></td>
<td> </td>
<td><div align="left">
<input name="Em_Position" type="text" id="Em_Position" value="<?=$_SESSION["Em_Position"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td height="28"> </td>
<td><div align="right" class="style62 style63 style65">รหัสบัตรประชาชน :</div></td>
<td> </td>
<td><div align="left">
<input name="Card_ID" type="text" id="Card_ID" value="<?=$_SESSION["Card_ID"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td height="28"> </td>
<td><div align="right" class="style62 style63 style65">ที่อยู่ :</div></td>
<td> </td>
<td><div align="left">
<input name="Em_Address" type="text" id="Em_Address" value="<?=$_SESSION["Em_Address"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td height="26"> </td>
<td><div align="right" class="style62 style63 style65">ตำบล :</div></td>
<td> </td>
<td><div align="left">
<input name="Em_Tumbol" type="text" id="Em_Tumbol" value="<?=$_SESSION["Em_Tumbol"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td height="27"> </td>
<td><div align="right" class="style62 style63 style65">อำเภอ :</div></td>
<td> </td>
<td><div align="left">
<input name="Em_Ampher" type="text" id="Em_Ampher" value="<?=$_SESSION["Em_Ampher"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td height="28"> </td>
<td><div align="right" class="style62 style63 style65">จังหวัด :</div></td>
<td> </td>
<td><div align="left">
<input name="Em_Provine" type="text" id="Em_Provine" value="<?=$_SESSION["Em_Provine"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td height="28"> </td>
<td><div align="right" class="style62 style63 style65">รหัสไปรษณีย์ :</div></td>
<td> </td>
<td><div align="left">
<input name="ZipCode" type="text" id="ZipCode" value="<?=$_SESSION["ZipCode"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td height="30"> </td>
<td><div align="right" class="style62 style63 style65">เบอร์โทรศัพท์ :</div></td>
<td> </td>
<td><div align="left">
<input name="Em_Phone" type="text" id="Em_Phone" value="<?=$_SESSION["Em_Phone"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td rowspan="2"> </td>
<td><div align="right" class="style62 style63 style65">อีเมลล์ :</div></td>
<td rowspan="2"> </td>
<td><div align="left">
<input name="Email" type="text" id="Email" value="<?=$_SESSION["Email"];?>" />
</div></td>
<td> </td>
</tr>
<tr>
<td><div align="right" class="style66">รูปภาพ :</div></td>
<td>
<div align="left">
<input type="file" name="filUpload[]" value="<?=$_SESSION["Em_Pic"];?>" />
</div></td>
<td> </td>
</tr>
</table>
<div align="center"></div>
<br />
<input type="submit" name="button" id="button" value=" บันทึกข้อมูล " />
<input type="reset" name="button2" id="button2" value=" ยกเลิก " />
<?
}
mysql_close($objConnect);
?>
<br />
<br />
</form>