Hi, I am having some trouble echoing into a drop down menu. Instead of the bandnames that I would like to appear, $band is appearing. Here is my code: <form action="insert.php" method="post"> Band Name <select name="band"> <? $link = mysql_connect(); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db(); $result = mysql_query("SELECT * FROM bands WHERE Username='$username'"); while($row = mysql_fetch_array($result)) { $band = $row['BandName'] ; echo '<option value=\"$band\">$band</option>' ; } ?> </select> Code (markup): I think it may be something to do with putting . $band . or maybe using '$band' as that is what I have seen but these don't seem to be working for me, so I am either way off or making little mistakes. Any help would be greatly appreciated. Thanks
You can't call a variable like that in single quotes. echo '<option value="'.$band.'">'.$band.'</option>' ; PHP: Will work