|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Why My Drop Down List is Empty? Help!!! Pls...
Hello!
I have been trying to find an answer for this one... all i am trying to do is...populating a drop down list from a mysql db...why is my drop down list empty? whats wrongwith the below code...? <HTML> <select name="home_name"> <?php include "mysql_data.inc"; $strsql = "select * from homes"; $rsTmp = mysql_query($strsql) or die("Query failed"); while($rowTmp = mysql_fetch_array($rsTmp,MYSQL_ASSOC)) { ?> echo "<option><?=$rowTmp[0]?></option> "; <?php } ?> </select> ?> </HTML> |
|
#2
|
|||
|
|||
|
I don't know what is wrong with that code.. Suddenly when i move the MYSQL_ASSOC,
it works like a champ. This is the code after i make the changes.. Quote:
Change table Player with your table in db |
|
#3
|
||||
|
||||
|
Why did you post your question twice?
refer to the answer in http://forums.devarticles.com/t10261/s.html |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Why My Drop Down List is Empty? Help!!! Pls... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|