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

Why triggers are used in mysql?

0 Answers  


can we use PGP with PHP?

1 Answers  


Is php 7 backwards compatible?

0 Answers  


What are the features of php 7?

0 Answers  


Explain the difference between unlink() and unset()?

0 Answers  






What is Different between Joomla And Magento?

0 Answers  


Which functions are used to count the total number of array elements in php?

0 Answers  


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

0 Answers  


What is the correct and the most two common way to start and finish a php block of code?

0 Answers  


What is the difference between explode() and split() functions?

0 Answers  


What do the initials of php stand for?

0 Answers  


How to randomly retrieve a value from an array?

0 Answers  


Categories