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 |
What is meant by urlencode and urldecode?
how we can crop an image and how we can display it..
How do you remove duplicates from an array?
How to get seconds from current date using date function ?
8 Answers Sarna Technologies, Satyam,
What is the function in PHP do not return a timestamp?
What are the two types of variables?
How to protect special characters in query string?
How do you create an array in php?
what is used for tmp table in oracle?
Why do we use polymorphism in php?
What is the use of header() function in PHP? What the Limitation of HEADER()?
write a prog using insert,update,delete in this manner as output? name: phno. add button 1.name phno. edit button delete button 2.