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

What is meant by urlencode and urldecode?

0 Answers  


how we can crop an image and how we can display it..

1 Answers   Satyam,


How do you remove duplicates from an array?

0 Answers  


How to get seconds from current date using date function ?

8 Answers   Sarna Technologies, Satyam,


What is the function in PHP do not return a timestamp?

0 Answers  






What are the two types of variables?

0 Answers  


How to protect special characters in query string?

0 Answers  


How do you create an array in php?

0 Answers  


what is used for tmp table in oracle?

0 Answers  


Why do we use polymorphism in php?

0 Answers  


What is the use of header() function in PHP? What the Limitation of HEADER()?

0 Answers  


write a prog using insert,update,delete in this manner as output? name: phno. add button 1.name phno. edit button delete button 2.

0 Answers  


Categories