我有以下代码:
<?php
// configuration
require("../includes/config.php");
// if form was submitted
if($_GET['id'])
{
$id = $_GET['id'];
$id = mysql_escape_string($id);
$sql = "DELETE FROM city WHERE id = $id";
mysql_query($sql);
}
?>
当我尝试从浏览器运行它时,我收到一条错误消息:
http://localhost/delete.php&id=3
The requested URL /delete.php&id=3 was not found on this server
http://localhost/delete.php
Notice: Undefined index: id in /home/localhost/html/delete.php on line 6
有人可以告诉我如何追踪正在发生的事情。请注意,我正在运行的机器无法运行像提琴手这样的东西