I’m trying to add Field Names to a drop down list, I previously added values to a drop down list and that worked, but for some reason its not doing anything when I’m trying to add the Field Names to a drop down list.
$result3=mysql_query(“SELECT * FROM bf2stats WHERE match_id=’$match_id’”);
If you have unexpected results, experiments will help to understand why you have it.
Your example code contain syntax errors - I think that you didn’t copy it from real example. May be there are logical errors, for this errors I need to see table dump with sample data.
Run your example and you will see (copy&paste it).
More I think that I see logical error:
You use mysql_fetch_field see docs for this function http://bg.php.net/mysql_fetch_field it return an “info object” not row. I think that you mean ‘mysql_fetch_object’.
No all I want it to return is the field name which I then compare to see if its not one of those I dont want shown.
Your example failed to work and just gave me a blank option under the first option.
Ok, see you even say it yourself… EXAMPLE!!! A lot code that people put up isn’t meant to be working. Its just a guide. You need to help yourself before we can help you. We aren’t here to write code for you.
Trial and Error is some of the best medicine.
I am not trying to be jerk, but why should we sit and put effort into fixing your problems when you seem to not do so yourself.