|
 |
|
ช่วยดู Code ให้หน่อยครับเนื่องจากรับค่าจาก Form มาแล้วส่งไป Update ไม่ได้ครับ |
|
 |
|
|
 |
 |
|
<body background="bg.jpg">
<?php
$hostname = "localhost";
$user = "root";
$password = "";
$dbname = "database";
$tblname = "ups";
mysql_connect($hostname, $user, $password) or die("ติดต่อฐานข้อมูลไม่ได้");
mysql_select_db($dbname) or die("เลือกฐานข้อมูลไม่ได้");
$sql = "update ups set type='$type',ip='$ip',group='$group', section='$section',add='$add', band='$band', model='$model',sn='$sn',suppie='$suppie',time='$time',warrunty='$warrunty',where id='$id'";
$dbquery = mysql_db_query($dbname, $sql);
echo "<center><Font Size=4 color=blue><B>แก้ไขข้อมูลเรียบร้อยแล้วดังนี้</center></B><Br>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4> รหัส : </Font><Font color=red face=AngsanaUPC size=4>$id<Br></Font>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4>ประเภท/ชนิด</Font><Font color=red face=AngsanaUPC size=4>$type<Br></Font>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4>Ip address : </Font><Font color=red face=AngsanaUPC size=4>$ip<Br></Font>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4>Group : </Font><Font color=red face=AngsanaUPC size=4>$group<Br></Font>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4>ฝ่ายแผนก : </Font><Font color=red face=AngsanaUPC size=4>$section<Br></Font>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4>สถานที่ติดตั้ง : </Font><Font color=red face=AngsanaUPC size=4>$add<Br></Font>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4>ยี่ห้อ : </Font><Font color=red face=AngsanaUPC size=4>$band<Br></Font>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4>รุ่น : </Font><Font color=red face=AngsanaUPC size=4>$model<Br></Font>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4>Sn : </Font><Font color=red face=AngsanaUPC size=4>$sn<Br></Font>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4>ซื้อจาก : </Font><Font color=red face=AngsanaUPC size=4>$suppie<Br></Font>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4>วันที่ซื้อ : </Font><Font color=red face=AngsanaUPC size=4>$time<Br></Font>";
echo "<dd><dd><Font color=blue face=AngsanaUPC size=4>การรับประกัน : </Font><Font color=red face=AngsanaUPC size=4>$warrunty<Br></Font>";
echo "<Br><center><A Href=\"edit_ups.php\"> <Font color=blue face=AngsanaUPC size=5>ดูผลการเปลี่ยนแปลง/แก้ไขอีก</font></A></center>";
?>
ขอบคุณมากครับ 
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
25 ส.ค. 2548 10:56:56 |
By :
chumpon_ka |
View :
2367 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
$sql = "update ups set type='$type',ip='$ip',group='$group', section='$section',add='$add', band='$band', model='$model',sn='$sn',suppie='$suppie',time='$time',warrunty='$warrunty',where id='$id'";
ดูดีดีนะครับว่า warrunty='$warrunty',where id='$id'"; คุณเผลอใส่ "," หน้า where ลงไปครับ...
|
 |
 |
 |
 |
Date :
25 ส.ค. 2548 11:34:09 |
By :
ken |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|