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
What does $_files means?
What is difference between html and php?
Is numeric in php?
Which is the dependent variable?
What are helpers in php?
What is csrf verification?
What are escaping characters? Explain with an example?
How to create a public static method in PHP?
What is session in php w3schools?
What are the different types of array in php?
How long is csrf token?
How to make horizonatl menu and vertical menu responsive
What are the functions for imap?
How to get the ip address of the client?
how can i develop forum code? any one pleale help me on this question