hi m making a program n i want that when i want to add update a stock it get the name of product from data base and show it in drop down list so that i can select one of them which i want to update. my code for that form in which drop down list is :
<form id="form1" name="form1" method="post" action="add_stock_process.php">
<p>Please select the product you want to add
<label>
<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("pras2");
$query="SELECT name,product_name FROM rpms";
$result = mysql_query ($query);
echo "<select name=menu_name value=''><option>Menu Name</option>";
while($menu=mysql_fetch_assoc($result)){
echo "<option value=$menu[product_name]>$menu[product_name]</option>";
}
echo "</select>";
?>
</label>
</p>
<p>Enter the amount of quantity received:
<label>
<input type="number" name="quantity" />
</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="Submit" />
</label>
</p>
</form>