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

Answers were Sorted based on User's Feedback



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

Answer / koushikgraj

Using post back or ajax functionality we can achieve this

Is This Answer Correct ?    6 Yes 2 No

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

Answer / 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

More PHP Interview Questions

Is php outdated 2019?

0 Answers  


What is difference between ksort() and usort() functions.

0 Answers  


What is the use of mysql_real_escape_string() function?

0 Answers  


What is the difference between die () and exit () in php?

0 Answers  


What is session and Cokkies . How it works . tell some thing about Session_id()

1 Answers   DVS, Net Solution, PVWEBCO,






How to define a user function?

0 Answers  


What is the default session time in php?

0 Answers  


What is The difference between ' and " where they can ben in between or outmost and how

2 Answers   Avis Software,


What is string function sql?

0 Answers  


What are the different tables(engine) present in mysql, which one is default?

0 Answers  


hai plz inform me specific books fo0r paper1,paper2 and paper 3 of group2 examination... plz giv me at the earliest......

1 Answers   APPSC, HCL,


How to remove html tags from data in php?

0 Answers  


Categories