[請益] 無法update
是否能請大大幫我看一下這隻程式錯在那裡
scenery_detail.php
<?
include("sql_connect.php");
include("my_msg.php");
include("db_func.php");
?>
<?
$sqlstr="SELECT * FROM scenery WHERE s_id='$s_id'";
$res=mysql_query($sqlstr);
$row=mysql_fetch_array($res);
//取出單筆資料內容
?>
<body bgcolor="#CCFFFF">
<center>
<p><font size="+6" color="#CC0000">風景區修改介面</font></p>
<p> </p>
</center>
<center>
<form name="form1" method="post" action="scenery_update.php">
<table width="50%" border="0" bgcolor="#00FFFF">
<tr>
<td>主題:<td><input type="text" name="s_title" size="20"
value="<?=$row['s_title']?>" disabled></td></td>
<tr><td>內容:<td><textarea rows="10" cols="35"
name="s_cont"><?=$row['s_cont']?></textarea>
</td></td>
</tr>
<tr><td><td>
<input type="submit" name="submit" value="送出">
<input type="reset" name="result" value="取消"></td>
</tr>
</table>
</form>
</center>
scenery_update.php
<?
include("sql_connect.php");
include("my_msg.php");
include("db_func.php");
?>
<?
if($check==upd)
{
$sqlstr="UPDATE scenery SET
s_title='$s_title',s_cont='".Changword($s_cont)."',
s_time='$s_time' where s_id='$s_id'";
db_query($sqlstr);
}
echo "<script>";
echo "alert(\"資料已更新\");";
echo "location.href = \"scenery_manage.php\";";
echo "</script>";
echo "<body onload = \"window.close();\">";
?>
沒任何錯誤,但資料卻無法更新,請大大能否幫我看一下,謝謝。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.21.84.177
推
10/22 14:46, , 1F
10/22 14:46, 1F
→
10/22 15:22, , 2F
10/22 15:22, 2F
→
10/22 15:51, , 3F
10/22 15:51, 3F
推
10/22 22:58, , 4F
10/22 22:58, 4F
推
10/22 23:12, , 5F
10/22 23:12, 5F
討論串 (同標題文章)
PHP 近期熱門文章
PTT數位生活區 即時熱門文章