i am having problem in printing the query result from MySQL db...
actually i am developing a very simple search module.
when the user select category from the given categories in drop down list....the coresponding product against that category shuld be displayed....
table= search
fields
product_id, product_name, category_name, price
[code=php]
<?
$cat=$_POST['category']
$query = "SELECT product_name FROM search WHERE category_name=$ cat";
$result=mysql_q uery($query);
echo "the products are:'$res'";
?>[/code]
[Please use CODE tags when posting source code. Thanks! --pbmods]
actually i am developing a very simple search module.
when the user select category from the given categories in drop down list....the coresponding product against that category shuld be displayed....
table= search
fields
product_id, product_name, category_name, price
[code=php]
<?
$cat=$_POST['category']
$query = "SELECT product_name FROM search WHERE category_name=$ cat";
$result=mysql_q uery($query);
echo "the products are:'$res'";
?>[/code]
[Please use CODE tags when posting source code. Thanks! --pbmods]
Comment