我不知道代码哪里错了,就是不显示,不显示内容,只出现了个输入的proname值,求大神指点

<?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>";

}


?>

laaa
浏览 993回答 3
3回答

慕设计2395807

DKOHRNJTWTPBKKGWDIYUBYVLJMVOBRUUKCQQMMCGNAGJGZOVBHKKUUNWAGGKLSIYYOQWJCFDJGCZVHBLXAUMSFLBTRNDAJNATTDTGFDGCZCYYONNPFCDTLLKUEUDJHSMVFFCSLLFRHUGTJJUXVREHHAOIIJVLIYEEXDDGYKTJGCEBUUACDWPYBHUKUGBEUIYHEMSLVRDMCFFBULBRFILBQUBOZPIZSPLFBVLRHKKGPXTAAJHHXTZBFIRKKHXAWNLLRKKAJJZAQPCCPLOAAGMVKUUEXQGKGSOYYHREVBLRMSWNNHATMMMIAWWWMIYIIUZIBCSYYKRHGERTDWQNOOENOONDQADTMMSCVKKHHDRIUEVVKMPFBRHKXXDQBORUADNWERUWYBZCISHGXTTTGJHGGAUUWWUXEQDNQZIONWZZMCSRNDZCOYFILVKTQSWPPNDBRXKGPZVFCFZZZTZYBELBBXHMHFBLUELLOENRNDJJZVGFZIFOUHKNCSOBBOIHXTJMKRBUNPCIJTJWKQTVHYYEXXJCCPVXQIUYKKPFLQXEKDTCMISHWTZZSQJAAQYPSVLPJPPPYYROXGZQGJZZYYONDOYBRHAKYEERKATHJSFGJMPCGGCZFFMVFHEHWGWNPNJYUWHQTPSPHXGPZUENJMIGWSOYNPYBEHDZVLSCSVEHKEBDMCMVEOWMFOQGJSURNJZPFVDTQMVEUJPYNXTWSBRNKQFIXAXACFUQHJSVLOEBJEOCKGDZBYVQSPLBJGWFIXMJMORNQTVYUQMIOXTIFDTCRBXHDXNJZPLUDAQXGKZCLADAPDSBEUDZCRFVEGQGKABDZJMYAJMCXMIRNDWFPSBKGQFTJWYHDNOMCEHQQGVEHXGJYVE

一凡

打开php的异常显示ini_set('error_reporting', E_ALL);
打开App,查看更多内容
随时随地看视频慕课网APP