anton_1 Posted August 11, 2011 Share Posted August 11, 2011 Thanks for your time guys: $data = @mysql_query("select * from names"); echo "<p>Select a Name: n"; echo "<Select Name="ID">n"; while ($row = mysql_fetch_assoc($data)) { $ID = $row['ID']; $year = $row['name']; echo "<option value=$ID>$namen"; } echo "</select>n"; echo "</p>n"; Quote Link to comment https://forums.phpfreaks.com/topic/244519-display-column-from-database-in-dropdown/ Share on other sites More sharing options...
anton_1 Posted August 11, 2011 Author Share Posted August 11, 2011 it's complaining about this line echo "<Select Name="ID">n"; Quote Link to comment https://forums.phpfreaks.com/topic/244519-display-column-from-database-in-dropdown/#findComment-1255962 Share on other sites More sharing options...
guyfromfl Posted August 11, 2011 Share Posted August 11, 2011 it's complaining about this line echo "<Select Name="ID">n"; What is it's gripe? Can you copy the error? Quote Link to comment https://forums.phpfreaks.com/topic/244519-display-column-from-database-in-dropdown/#findComment-1255964 Share on other sites More sharing options...
cunoodle2 Posted August 11, 2011 Share Posted August 11, 2011 it's complaining about this line echo "<Select Name="ID">n"; You need to escape the double quotes in the echo statement like this.. echo "<Select Name=\"ID\">n"; OR you can do this.. echo '<Select Name="ID">n'; Quote Link to comment https://forums.phpfreaks.com/topic/244519-display-column-from-database-in-dropdown/#findComment-1255967 Share on other sites More sharing options...
guyfromfl Posted August 11, 2011 Share Posted August 11, 2011 cunoodle is right...that should do it.. Quote Link to comment https://forums.phpfreaks.com/topic/244519-display-column-from-database-in-dropdown/#findComment-1255969 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.