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 is trim codeigniter?

913


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

1113


Does php support polymorphism?

905


What php framework does wordpress use?

959


Who developed php?

918


How can cross site request forgery csrf be prevented?

890


What is the difference between htmlentities() and htmlspecialchars()?

952


What does sign mean php?

919


How to convert the first character to upper case?

907


What is the difference between php and java?

931


What are the method available in form submitting?

936


What are the different opening and closing tags available in PHP?

916


What does the scope of variables means?

962


Where php basically used?

939


What is a static method php?

952