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 array empty php?
Can I learn php in a month?
How can we automatically escape incoming data?
Write a program to display a table of any given number?
What are the advantages of indexes in php?
Does jwt protect against csrf?
Which function Returns the time of sunrise for a given day / location in PHP.
Is php easier than javascript?
What is the scope of a variable defined outside a function?
What is the difference between require and include in php?
What is the use of explode() function?
Explain what is the difference between $var and $$var?