這是我的腳本,它顯示一個空白,我不知道問題是什麼。幫幫我!!!! #NEW到PHPPHP腳本顯示空白頁
<?php include "connection.php";
// Get the ID from URL.
if(isset($_GET['id']));
$id = $_GET['id'];
$query="SELECT * FROM module WHERE id= '$id'";
$result= mysqli_query($m, $query);
while ($row = mysqli_fetch_array($result)){
$title=$row['title'];
$level=$row['level'];
$credits=$row['credits'];
$school=$row['school'];
echo $title. " " . $level. " " . $credits. "<br />";
}
?>
錯誤:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE id= 'Careers'' at line 1
添加'的ini_set( 'display_errors設置',1);函數ini_set( 'display_startup_errors',1);使用error_reporting(E_ALL);'你的代碼的頂部,並告訴我們,如果有被報告的任何錯誤。另外,'$ _GET'的內容是什麼。 – apokryfos
你能確保connection.php工作正常嗎? –
你是對的!我刪除它,以避免其他人做這個msitake – Delphine