Make a "dynamic drop down list" with using only PHP,HTML
and MySQL..
Answers were Sorted based on User's Feedback
Answer / koushikgraj
Using post back or ajax functionality we can achieve this
| Is This Answer Correct ? | 6 Yes | 2 No |
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 |
Is empty in excel?
how we can retrive data in pdf along php mysql?
what is pear in php in brief ?
How many escape sequences are recognized in single-quoted strings?
How to call javascript function in php on button click?
How can we destroy the session, how can we unset the variable of a session?
How to remove leading and trailing spaces from user input values?
What is form action php?
How do I check if a given variable is empty?
Describe the differences between the object models in PHP 4 and PHP 5.
Tell me how to strip whitespace (or other characters) from the beginning and end of a string?
Explain how does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?