<?php
$link=@mysql_connect("localhost","root","root");
mysql_select_db("pro_info",$link) or die("不能选择数据库,".mysql_error());
$cname=$_POST["proname"];
echo $cname;//这句话可以显示
$where="";
$where="where name like '%$cname%'";
$sql="select *from product $where";
$query=mysql_query($sql) or die(mysql_error());
while($row=mysql_fetch_array($query))
{
echo $row['id'].$row[1].$row[2]."<br>";
}
?>
慕设计2395807
一凡