june_c21 Posted January 21, 2008 Share Posted January 21, 2008 hi, can someone figure out what's wrong with this? on my selection list, it is empty, no data been extract out from the database <td><select name="users" onChange="showUser(this.value)"> <OPTION VALUE="1"> <?php $host = 'localhost'; $user = 'root'; $password = 'admin'; $dbase = 'tool'; $dblink = mysql_connect($host,$user,$password); mysql_select_db($dbase,$dblink); $query = "SELECT title from tool_list "; $result = mysql_query($query); while($myrow = mysql_fetch_row($result)) { echo "<OPTION VALUE=\"" . $myrow[0] . "\">" ; } ?> </select></td> Link to comment https://forums.phpfreaks.com/topic/87014-solved-php-pull-down-menu-error/ Share on other sites More sharing options...
vbnullchar Posted January 21, 2008 Share Posted January 21, 2008 does it output an error? Link to comment https://forums.phpfreaks.com/topic/87014-solved-php-pull-down-menu-error/#findComment-444953 Share on other sites More sharing options...
hamza Posted January 21, 2008 Share Posted January 21, 2008 Your code just fetch one index and that is 0 index. AND SECOND THING IS THAT WHAT KIND of error you have seen always show the error for help ----------------------------------------- AND ALWAYS CONNECT with db on the top of the page its preferable Link to comment https://forums.phpfreaks.com/topic/87014-solved-php-pull-down-menu-error/#findComment-445096 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.