I am trying to write a form, It works fine, but after the drop down box the text stating "select color" does not appear and I have tried putting in breaks and everything but I can't get the first radiobutton onto the next line. The form can be seen on http://www.lamped.com/rwc.php The code is as follows:
function index() {
global $barcolor, $topic, $prefix, $dbi;
echo "<form method=\"post\" action=\"rwc.php?op=review\">";
echo "<b>Select Topic:</b> <select name=\"topic\"><br>";
$toplist = sql_query("select topicid, topictext from ".$prefix."_topics order by topictext", $dbi);
echo "<OPTION VALUE=\"\">Select Topic</option>\n";
while(list($topicid, $topics) = sql_fetch_row($toplist)) {
if ($topicid==$topic) { $sel = "selected "; }
echo "<option $sel value=\"$topicid\">$topics</option>\n";
$sel = "";
}
echo "<p>Please choose a color:</p>";
echo "<input type=\"radio\" checked name=\"barcolor\" value=\"r\">Red<img src=\"images/calendar/ballr.gif\" alt=\"\"> ";
echo "<input type=\"radio\" name=\"barcolor\" value=\"g\">Green<img src=\"images/calendar/ballg.gif\" alt=\"\"> ";
echo "<input type=\"radio\" name=\"barcolor\" value=\"b\">Blue<img src=\"images/calendar/ballb.gif\" alt=\"\"> ";
echo "<input type=\"radio\" name=\"barcolor\" value=\"w\">White<img src=\"images/calendar/ballw.gif\" alt=\"\"> ";
echo "<input type=\"radio\" name=\"barcolor\" value=\"y\">Yellow<img src=\"images/calendar/bally.gif\" alt=\"\"> <br><br>";
echo "<input type=\"submit\" name=\"submit\" value=\"Submit\">";
echo "</form>";
}