I am working on a page and not sure how to make this work.
In a form in form.php I have an area of array checkboxes called food(), where the user can check types of food.
The checkboxes are added from a table called foodtypes and includes food_id and food_type
Example 1 is vegetarian, 2 is meat, 3 is fast food, and so on...
Then I have radio buttons with continents of the world and also one for the whole world.
Theses radio buttons are inside the form and there are world, europe, africa, asia, north america, and so on.
The user can check what kind of food they are after (one or several).
They also click one of the radio buttons to decide what part of the world (or the button for the whole world).
When they click the submit button they will end up on a new page called show.php
The user have an id in a user_table and the continent selection is stored in the user db.
The food type selection is stored in another table called food_sel. Here I store the user_id and the selection they made by the food_id.
On the new page (show.php) I want the user to see all the choices that are available in the database in a list.
So, if they picked Asia and vegetarian and fast food they will get a list of all the restaurants in the database that serve fast food in asia and also the ones that serve vegetarian food in asia.
All the restaurants in the database contains only one type of food.
So I need to get the rows that are selected echoed in a list, but I can not figure out how to make this call to the mysql in the right way.
foodtypes: food_id | food_type
food_sel: user_id | food_id
user_table: user_id | username | continent_sel