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
Do loops php?
How to download and install php on windows?
How to define a user function?
How can you increase the maximum execution time of a script in php?
How to find the length of a string?
Write a program to display a table of any given number?
How to redirect https to http url through .htaccess?
What are the design patterns in php?
Are php session secure?
What is the use of print_r function in php?
Which function would you use to read a line of data from a file in php?
Write a program to get second highest number in an array using php?
What is the difference between the include() and require() functions?
What is the apache?
How to move uploaded files to permanent directory?