Help me for my php code!
...........................................
This is the code... and im using iframe for this, and this code must be the action to search my query... but to the next page it doesn't show up...
when i try the queries to mySQL, it works but not in php.... PLEaSE HELP !!!
.............................................
<?php
$pqs_name = $_POST[pqs_name];
$menu_name = $_POST[menu_name];
$con = mysql_connect("localhost","root","");
if(!$con){
die('could not connect:'.mysql_error());
}
mysql_select_db("thesis",$con);
$result = mysql_query ("SELECT a.pqs_name, b.menu_name, c.food_name FROM pqsetup a, menu_packages b, food_details c, menu_details d
WHERE a.pqs_no = b.pqs_no AND d.food_no = c.food_no AND d.menupackage_no = b.menupackage_no
AND a.pqs_name = '$pqs_name' AND b.menu_name = '&menu_name' ");
echo "<center><table border=1>";
echo "<td width =20%>PQS Name</td>";
echo "<td width =20%>Menu Name</td>";
echo "<td width =20%>Food Name</td>";
echo"</table></center>";
while ($search = mysql_fetch_array($result))
{
echo "<center><table border=1>";
echo "<td width =20%>" . $search['pqs_name'] . "</td>";
echo "<td width =20%>" . $search['menu_name'] . "</td>";
echo "<td width =20%>" . $search['food_name'] . "</td>";
echo"</table></center>";
}
mysql_close($con);
?>
|