腦筋急轉彎-修改
題目:
答案:
query($sql_query) or die("錯誤:".$sql_query); //echo $sql_query.""; } $sql_query = "SELECT * FROM think where tid = $_GET[xxxx] "; $result = $db_link->query($sql_query); $row = $result->fetch_array(); ?> ``` 刪除HTML ``` 動作 刪、 修 ``` 刪除PHP ``` if($_GET[xxxx]) { $sql_query = "delete from think where xxxx = $_GET[xxxx] "; $db_link->query($sql_query) or die("錯誤:$sql_query"); } ``` 刪除時的警告 ``` onclick="javascript:return confirm('確定要刪除這筆資料嗎?');" ```
動作 刪、 修 ``` 刪除PHP ``` if($_GET[xxxx]) { $sql_query = "delete from think where xxxx = $_GET[xxxx] "; $db_link->query($sql_query) or die("錯誤:$sql_query"); } ``` 刪除時的警告 ``` onclick="javascript:return confirm('確定要刪除這筆資料嗎?');" ```
if($_GET[xxxx]) { $sql_query = "delete from think where xxxx = $_GET[xxxx] "; $db_link->query($sql_query) or die("錯誤:$sql_query"); } ``` 刪除時的警告 ``` onclick="javascript:return confirm('確定要刪除這筆資料嗎?');" ```
onclick="javascript:return confirm('確定要刪除這筆資料嗎?');" ```