ให้แสดงข้อความ ได้แบบนี้ค่ะ
update ord set emsid='',timesend='',apostil='111111111', orderup='',status='2' where ID='' ปรับปรุงการส่งสินค้าเรียบร้อยแล้วค่ะ
formupdate.php
โค้ด: เลือกทั้งหมด
<form action="uodate.php" method="post" name="formupdate" >
<?
include "config.inc.php";
$ID1=$_GET[ID];
$sql="select * from ord where ID='$ID1'";
if(!$result=mysql_query($sql)){
echo "ไม่สามารถแก้ได้.";
}
$rs=mysql_fetch_array($result);
$ID=$rs[ID];
$emsid=$rs[emsid];
$apostil=$rs[apostil];
?>
<td><div align="right">สถานะการส่งสินค้า: : </div></td>
<td><div align="left">
<label>
<select name="status" id="status">s
<option value="0">-- กรุณาเลือก --</option>
<option value="1">ยังไม่ได้ส่งสินค้า</option>
<option value="2">ส่งสินค้าแล้ว</option>
</select>
</label>
</div></td>
</tr>
<tr bgcolor="#ECE9D8">
<td><div align="right">เลขที่พัสดุ : </div></td>
<td><div align="left">
<label>
<input name="emsid" type="text" id="emsid" value=""/>
</label>
</div></td>
<form action="uodate.php" method="post" name="formupdate" >
<?
include "config.inc.php";
$ID1=$_GET[ID];
$apostil1=$_REQUEST[apostil];
$sql="select * from ord where ID='$ID1'";
if(!$result=mysql_query($sql)){
echo "ไม่สามารถแก้ได้.";
}
$rs=mysql_fetch_array($result);
$ID=$rs[ID];
$emsid=$rs[emsid];
$apostil=$rs[apostil];
?>
<td><div align="right">สถานะการส่งสินค้า: : </div></td>
<td><div align="left">
<label>
<select name="status" id="status">s
<option value="0">-- กรุณาเลือก --</option>
<option value="1">ยังไม่ได้ส่งสินค้า</option>
<option value="2">ส่งสินค้าแล้ว</option>
</select>
</label>
</div></td>
</tr>
<tr bgcolor="#ECE9D8">
<td><div align="right">เลขที่พัสดุ : </div></td>
<td><div align="left">
<label>
<input name="emsid" type="text" id="emsid" value=""/>
</label>
</div></td>
update.php
โค้ด: เลือกทั้งหมด
<?
include "config.inc.php";
$ID1=$_POST[ID];
$emsid1=$_POST[emsid];
$timesend1=$_POST[timesend];
$apostil1=$_POST[apostil];
$orderup1=$_POST[orderup];
$status1=$_POST[status];
$sql="update ord set emsid='$emsid1',timesend='$timesend1',apostil='$apostil1',
orderup='$orderup1',status='$status1' where ID='$ID1'";
echo $sql;
$result=mysql_query($sql);
if($result){
echo " ปรับปรุงการส่งสินค้าเรียบร้อยแล้วค่ะ" ;
}else
{
echo"ไม่สามารถแก้ไขสินค้าได้";
}
mysql_close();
?>
ช่วยหน่อยนะค่ะ ขอบคุณมากค่ะ