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

What does $_files means?

1030


What is difference between html and php?

923


Is numeric in php?

1034


Which is the dependent variable?

900


What are helpers in php?

932


What is csrf verification?

1066


What are escaping characters? Explain with an example?

943


How to create a public static method in PHP?

1023


What is session in php w3schools?

1051


What are the different types of array in php?

971


How long is csrf token?

918


How to make horizonatl menu and vertical menu responsive

2296


What are the functions for imap?

1107


How to get the ip address of the client?

9166


how can i develop forum code? any one pleale help me on this question

1932