<?php$link=@mysql_connect("localhost","root","root");mysql_select_db("pro_info",$link) or die("不能選擇數(shù)據(jù)庫,".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>";}?>
3 回答

添加回答
舉報
0/150
提交
取消