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 is trim codeigniter?
How many open modes available when a file open in PHP?
Does php support polymorphism?
What php framework does wordpress use?
Who developed php?
How can cross site request forgery csrf be prevented?
What is the difference between htmlentities() and htmlspecialchars()?
What does sign mean php?
How to convert the first character to upper case?
What is the difference between php and java?
What are the method available in form submitting?
What are the different opening and closing tags available in PHP?
What does the scope of variables means?
Where php basically used?
What is a static method php?