- 论坛徽章:
- 0
|
使用php5.3版本,提示Notice: Undefined index: search in E:\work\www\myphp\file.php on line 38 |
不知是何缘故?
<center>
<form action="search.php" method="GET" >
<select name="select" id="value" >
<option value ="csxm">厂商姓名</option>
</select>
<input type="text" name="search">
<input type="submit" name="submit" value="搜索">
</from>
</center>
<?php
include ("conn.php" ;
?>
<table border="0" align="center" bgcolor="#add3ef">
<thead>
<tr>
<th>厂商名称</th>
</tr>
</thead>
<?
if($_GET["search"]){ //第38行
$sql="select * from doc where csxm like '%$_GET[search]%' order by id desc";
[url=mailto query=@mysql_query($sql,$conn]$query=@mysql_query($sql,$conn[/url]);
while($row=mysql_fetch_array($query))
{
?>
<tbody>
<tr bgcolor="#eff3ff">
<td><?=$row["csxm"]?></td>
</tr>
</tbody>
<?}
}?>
</table> |
|