我的屏幕是白色的,没有 php 错误,没有 sql 错误……只是白色的。我的代码有什么问题?
<?PHP require ("../SQL.php");
if($id=filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING)); else
$id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_STRING);
$editare = "SELECT marca, model FROM modele WHERE id={$id};";
foreach ($dbh->query($editare) as $linie)
{
$id = $linie['id'];
$marca = $linie['marca'];
$model = $linie['model'];
} ?>
<?php require ("../SQL.php");
$editare = "DELETE FROM modele WHERE id=$id";
if ($dbh->query($editare))
{
print '<center><h2><img src="http://bahoy.tk/images/ok.png"></img><br /><br />Telefonul/Tableta este sters!</h2><br />
Vei fi redirectionat in cateva momente inspre adaugarea unui nou model de tableta sau telefon!
<meta http-equiv="refresh" content="2; URL=index.php"/></center>';
}
else(mysql_error())
?>
我只想从id
一个查询中删除所有指定的内容。