Dynamic drop down list from a database

I’m trying to print the value from a dynamic drop down list from a database and then input the value selected in a textbox. this is what I have, but the textbox does not update. Please help…

<?php $user = '***'; $pass = '********'; $dbName = '******'; $dbHost = 'localhost'; $con_err = 'connection error'; if (!@mysql_connect($dbHost, $user, $pass) ||!@mysql_select_db($dbName) ) { die ($con_err); } else { echo 'CONNECTED to Server', "


"; } ?>




Select category

<?php $result = mysql_query("SELECT `id`, `Username` , `ALEVEL`, `Activated` FROM `employee` " ); if ( $result ) { echo 'Categories from MySQL.'; while( $row = mysql_fetch_array($result, MYSQLI_ASSOC) ) { echo '' . $row['Username'] . ''; } } else { echo 'Couldn\'t fetch Categories from MySQL.'; } ?>

What doesn’t work? Your JavaScript will fail because it is not closed. It is missing a semicolon and closing bracket.

Sponsor our Newsletter | Privacy Policy | Terms of Service