When i use the folowing code to display some rows from a table field i don't get any errors but the rows aren't displayed either. I think there must be a problem with value $category , but i can not figure it out.
If any1 could help me with this i would realy apreciate it.
printf("<form method=post action=test.php");
$db = mysql_connect("localhost", "root","");
mysql_select_db("knowledgebase",$db);
$sql_result = mysql_query("SELECT XRD FROM category");
while ($myrow = mysql_fetch_array($sql_result)) {
$Category= $myrow["Category"];
$option_block .= "<OPTION value=\"$Category\">$Category</OPTION>";
;
}
echo "Submitted value:".$category;
<b><font face=Verdana, Arial, Helvetica, sans-serif size=3>Category:</b></font>
<form name="testForm" action="test.php">
<SELECT name="Category">
echo "$option_block";
</SELECT><BR>
<input type="submit" value="Send">
</form>
With kind regards,