I've done this :-
$qry=mysql_query("SELECT client.resID, menu.name FROM client INNER JOIN menu ON
client.resID = menu.resID WHERE client.resID = $resID");
$row=mysql_fetch_array($qry);
echo $row['name'];
}
?>
<form action="client_admin_post.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<p>Services :
<label for="cat"></label>
<input type="text" name="name" id="name" value="<?php echo $row['name']; ?>" />
</p>
<p align="center">
<input type="submit" name="Submit" id="Submit" value="Submit" />
</p>
</form>
I'm building a php form that fetch data from MySQL table. It's for editing the data in MySQL table. The problem is now, let's say, there are many menus in a restaurant. So, in this case, there are many rows in 'menus' MysQL table with same restaurantID(pk). I need to fetch all the menus to 5 fields. With this code, I can only fetch a menu only. How could I do that?
Thank you :D Thank you