Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Make a "dynamic drop down list" with using only PHP,HTML
and MySQL..

Answer Posted / sasmitamohanta

<select name="name">
<option value="">Select Name</option>
<?
// make connection to data base
mysql_connect('localhost','root','') ;

//select database
mysql_select_db('mail');

//select all da from 'table' say it ve two colom Id and Name
$sql=mysql_query("select * from table");

//select one by one row data s
while($r=mysql_assoc($sql))
{?>
<option value="<?=$r['Id'];?>"><?=$r['Name'];?></option>
<?}?>

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many open modes available when a file open in PHP?

1166


What are include() and require() functions?

962


What is escaping to php?

968


Does PHP 5 support exceptions? State Whether True or False?

1119


What is magic function in php?

1035


Is python easier than php?

1012


hello all, I need some sample placement papers in lion bridge.. can anyone help me?

2047


What should we do to be able to export data into an excel file?

1035


Explain difference between urlencode and urldecode?

1124


In php, how to redirect from one page to another page?

932


What is the use of mysql_real_escape_string() function?

936


Can you give example for trait in php?

1009


How to get ip address of a server in php?

1025


How to concatenate two strings in php?

1086


How can you create a session in php?

1065