<?php
if($_POST["submit"])
{
$search= $_POST['title'];
$result=$connection->query("select count(*) from _zhiduguanli where title like '%$search%' ");
$os=$result->fetch_row();
echo $os['title'];
}?>
<p align="center">标题搜索: <input name="search" type="text" style="width:200; height:38;font-size:20pt" size="10" /><input type="submit" name="submit" value="搜索" style="font-size:15pt"/> <a href="index.html"><strong>返回主页</strong></a> <?php
echo"总共有 $infocount 条标题";
?>
if($_POST["submit"])
{
$search= $_POST['title'];
$result=$connection->query("select count(*) from _zhiduguanli where title like '%$search%' ");
$os=$result->fetch_row();
echo $os['title'];
}?>
<p align="center">标题搜索: <input name="search" type="text" style="width:200; height:38;font-size:20pt" size="10" /><input type="submit" name="submit" value="搜索" style="font-size:15pt"/> <a href="index.html"><strong>返回主页</strong></a> <?php
echo"总共有 $infocount 条标题";
?>
$result=$connection->query("select count(*) from _zhiduguanli where title like '%$search%' ");
$os=$result->fetch_row();
echo $os['title'];
改为:$result=$connection->query("select count(*) from _zhiduguanli where title like '%$search%' ");
$data = array();
while($thread=mysql_fetch_assoc($result)){
$data[] = $thread;
}
print_r($data);