//获得连接
$db = mysql_connect("localhost", "root", "root") or die(mysql_error());
//echo "Connected to MySQL
";
//连接数据库
mysql_select_db("test") or die(mysql_error());
//echo "Connected to Database";
//查询数据,并用表格显示出来
@$checked = $_POST['checked'];
@$result = mysql_query("select * from books",$db);
echo "
| isbn | author | title | price |
| %s | %s | %s | %s | ", $myrow[0], $myrow[1],$myrow[2],$myrow[3]);
?>
------解决方案--------------------
result = mysql_query("select * from books where checked=‘$checked’ ");
------解决方案--------------------
if(isset($_POST['checked'])){
@$result = mysql_query("select * from books",$db);
echo "
| isbn | author | title | price |