I need to store some user related data. I aready have a table that contains other information. I am thinking of adding anothet field to the table and probably store new set of data ina form of an associative array (I think...)
Here's an example.
I'll have a drop down for category and 3 text fields. Clearly the number of categories will stay the same. But the number of sets of data (from the 3 textfields) could be unlimited (well, don't expect more than 20 anyway). Each set of data need to be associated with a particular category.
<select name=category>
<option value=cat1>Category 1
<option value=cat2>Category 2
<option value=cat3>Category 3
</select>
<input type=text name=field1>
<input type=text name=field2>
<input type=text name=field3>
The data needs to be stored and retreived somehow in the following format:
Category1
field1=>value1
field2=>value2
field3=>value3
field1=>value4
field2=>value5
field3=>value6
Category2
field1=>value7
field2=>value8
field3=>value9
Now, at the moment I can generally think of this implementation, but have no idea how to store the data in this format. I am not even sure this is the way to go. Need help!