get value from DDL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
madu
Forum Commoner
Posts: 32
Joined: Sat Dec 25, 2010 3:19 am
Location: india

get value from DDL

Post by madu »

Code: Select all

hi friends,,,,,
                      i retrieved data from database and stored into dropdown list box...... now i want to value of selected item,,,, for example now i have 3 values in dropdown list box such as student,frient and data,,, if i store the selected value into php variable then  i will complte my work,,,, :roll:  :roll:  :roll: 

while($er=mysql_fetch_assoc($ds))
{
   //print $er['Tables_in_gm']."<br>";

	$dar[$t]=$er['Tables_in_gm'];
	
	$t++;

}
echo "<br>";

echo "Select the  group you want to add =>";
echo "<select id=ty name=group>";
foreach ($dar as $key => $value)
{
echo "<OPTION > $value</option>";

}
echo "</select>";
Post Reply