Hey, I just threw a party as I thought I had solved my enum problem when I found a thread on here about how to extract the different enum values into an array..... but it seems I've not figured it out quite yet. (well, not really a party as I just had breakfast instead of just coffee).
Anyhow, I was happy as a goose typing up what I thought would solve my little problem here, but whooopppsie... now what should turn out to be an automatic form just doesnt turn up at all. (now, please dont tell me I should have gotten coffee instead of breakfast cause I'm out of coffee).
Here's the code that SHOULD work in my eyes:
for ($i = 0; $i < $columns; $i++)
{
$fieldtypetest = mysql_field_type($field_list, $i);
$fieldflagtest = explode (" ", mysql_field_flags($field_list, $i));
if(in_array("enum", $fieldflagtest))
{
$render_insert .= "<tr><td bgcolor=\"#B0BADA\"><div align=right class=\"text\">" .mysql_field_name($field_list, $i). ": </div></td>";
$render_insert .= "<td><select name=" .mysql_field_name($field_list, $i). ">";
while($enumarray = explode("','", mysql_fetch_array($field_list, $i)))
{
foreach ($enumarray as $enumvalue)
{
$render_insert .= "<option>$enumvalue</option>";
}
}
$render_insert .= "</select></td></tr>";
}
}
Now in my head this should create an automatic selection menu containing the enum values to choose from. I have other scripts like this for the other types of columns, and have made it so they should create an automatic tableform, so that the right type of information would get into the right fields regardless of their names.