[請益] 無法update

看板PHP作者 (roger70349)時間18年前 (2007/10/22 14:15), 編輯推噓3(302)
留言5則, 4人參與, 最新討論串3/4 (看更多)
是否能請大大幫我看一下這隻程式錯在那裡 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>&nbsp;</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
if($check==upd) 程式在這邊沒有進入
10/22 14:46, 1F

10/22 15:22, , 2F
那應該如何修改比較好,謝謝。
10/22 15:22, 2F

10/22 15:51, , 3F
就要看你$check給的是什麼了..
10/22 15:51, 3F

10/22 22:58, , 4F
upd是啥?
10/22 22:58, 4F

10/22 23:12, , 5F
constant? string?
10/22 23:12, 5F
文章代碼(AID): #17740Vzx (PHP)
討論串 (同標題文章)
文章代碼(AID): #17740Vzx (PHP)