Hi i'm pretty new to php, and i'm trying to make a dropbox wich is fetched from a mysql table, fields
Well the displaying of the fields withing the form works correct. I also can put the info in the correct table, but the problem is that the variable are called 0,1,2 etc instead of the names they should have.
the code is part of a an other form;
<?
$connection = mysql_connect("localhost","root","");
$fields = mysql_list_fields("knowledgebase", "category", $connection);
$columns = mysql_num_fields($fields);
echo "<select name=Category>";
for ($i = 0; $i < $columns; $i++) {
echo "<option value=$i>";
echo mysql_field_name($fields, $i);
}
echo "</select>";
?>
Can some1 help me with how to get the name value of 0,1,2 into my table.
with kind regards,
Shadeless