<meta http-equiv="content-type" content="text/html; charset=gb2312">
<form method="post" action="search.php" name="search">  
<input name="search" type="text" value="" size="15">   
<input type="submit" value="Search">  
</form>  
<?php  
    
    @$searchs = $_POST['search'];  

?>  
  <p class="content">您输入的搜索关键字为:  
<?php  
    
    echo $searchs;  
?>  
  ,以下为搜索结果:</p>  
<?php  
if(isset($_POST['submit'])){
$link = mysql_connect('localhost', 'root', '123456');
if (!$link) {    
die('Could not connect: ' . mysql_error());
}mysql_select_db('doctor'); 
mysql_query("set names 'gb2312'"); $query = mysql_query("select * from doctor where doctor_id like '%$searchs%' ") ;  while($data = mysql_fetch_array($query)){  
 echo $data[1]; }};
?> 搜索之后 不能显示输出结果,是什么问题? 
我试过去掉if(isset($_POST['submit'])),搜索功能就可以用了,但是还没搜索就把所有的结果的输出了