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

Are php sessions cookies?

1006


Does php support multithreading?

1104


Does php class need constructor?

995


What is a php 5?

1149


How do I debug php?

986


What is the purpose of $_ session?

1006


Tell me what's the difference between include and require?

1056


Explain scalar type declarations in php7?

1008


What is the difference between Session and Cookie?

1111


How is a constant defined in a PHP script?

1082


Does php support polymorphism?

991


How do I clear my browser session?

1085


What is cookie and why do we use it?

1041


What are the functions to be used to get the image's properties (size, width and height)?

1030


What is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?

977