Your existing code already correctly loops through the result set.
As to the second part, "what can i do, to make it update etc 10 categories in the same form, with the same name?" makes absolutely no sense to me plus the select * doesn't tell us what fields you're pulling anyway if you wanted to use one of those. I'm thinking too it's one of the fields in that table, maybe a category ID as was mentioned by the other respondent. On a side note, you should only select the fields you're using unless you're using them all. FYI - to optimize you queries.
You mentioned to think "array" in your comments so if you're asking how a form name attribute can contain mulitiple values, the solution is to simply append [] on the end, i.e. "name='foobar[]'". But that's not used in an INPUT tag, so just use the $o->whatever_name_it_is as was suggested.
-jim
Last edited by SrWebDeveloper; 12-04-2009 at 12:04 PM.
Bookmarks