|
|
|
ฟอร์มแก้ไขข้อมูล ดึงค่า จาก textbox และ listbox มันไม่ขึ้นอ่ะ ใครรู้ว่าผิดตรงไหน หรือต้องแก้ ตรงไหน ช่วยบอกทีค่ะ |
|
|
|
|
|
|
|
<?
session_start();
if($sess_adminid<>session_id()){
header("Location:admin_login.php"); exit();
}
include "connect.php";
$id = $_REQUEST["id"];
$sql= "select * from vocab ";
$result=mysql_db_query($dbname,$sql);
$row= mysql_fetch_array($result);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ระบบการเรียงลำดับคำไทย- แก้ไขคำศัพท์</title>
</head>
<body>
<div align="center">
<h2>ฟอร์มแก้ไขคำศัพท์</h2>
</div>
<form method="post" action="change_profile.php">
<table width="80%" border="1" align="center" cellpadding="5" cellspacing="1">
<tr>
<td>รหัสคำศัพท์ </td>
<td><label>
<input name="idword" type="text" id="idword" value="<? echo $row["id"]?>" />
<input type="hidden" name="idword" id="idword" value="<? echo $row["id"]?>" />
</label></td>
</tr>
<tr>
<td>คำศัพท์</td>
<td><input name="word" type="text" id="word" value="<?echo $row["word"]?>" /></td>
</tr>
<tr>
<td>ชนิดคำศัพท์</td>
<td><select name="pos" id="pos">
<?
$pos_list = array("-","NN", "PN", "VV", "AD","CN","PP","IN");
foreach ($pos_list as $pos) {
if ($pos == $row["pos"]) {
echo "<option value='$pos' selected='selected'>$pos</option>";
}
else {
echo "<option value='$pos'>$pos</option>";
}
}
?>
</select></td>
</tr>
<tr>
<td>หน้าที่คำศัพท์</td>
<td> <select name="functions" id="functions">
<?
$functions_list = array("-","Subject", "Object", "Auxiliary verb", "Reject","Question","Tell infallibility","Tell Time","Tell a demonstrative","Accrete","Accept","Place","Interventions","Describe","I repeat the point","Neither","The same reason","The only point I do not");
foreach ($functions_list as $functions) {
if ($functions == $row["functions"]) {
echo "<option value='$functions' selected='selected'>$functions</option>";
}
else {
echo "<option value='$functions'>$functions</option>";
}
}
?>
</select></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="ยืนยัน" />
<input name="reset" type="reset" value="ยกเลิก" id="reset" /> </td>
</tr>
</table>
</form>
</body>
</html>
Tag : PHP, MySQL
|
|
|
|
|
|
Date :
2010-12-04 15:42:58 |
By :
areijung |
View :
1061 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|