I've been heading down the wrong paths looking for the answers to this problem. In theory, it's straightforward. In practice, however, I'm hitting a brick wall.
I have the code successfully entering a series of checkbox data into a database client_info with an associated userid.
I am trying to have a page show sub-categories and their associated checkboxes from one or more of the 10 selected categories.
For instance, the user selects checkboxes 1, 3, 9, & 10. On the following page, I'd like to have
$query = "SELECT skill_id FROM client_info WHERE userid = '$userid'";
I get kind of lost here. I think I want to have a series of conditional statements such as
if (something=="1"){
echo "Category 1 and subcategory items";
}
if (something =="2"){
echo "Category 2 and appropriate subcategory items";
}
...
...
...
if (something =="10"){
echo "Category 10 and appropriate subcategory items";
}
My problem is I don't know how to pull out "something" from the query to have it run through each of the appropriate checks to display the information I wish it to. In fact, I don't even know what "something" is supposed to be!
Is there a better solution, and if so, could you please help me? Thanks.