I have 2 tables in my sql database
Advert table (advert_id, amenities, title, description)
amenities table (amenities_id, amenities, description)
My create advert form gets and displays values for amenities from the amenities table.
I am trying to save the advert into the advert table, but I don't know how to save selected amenities into the advert table. Also I don't know how to get values for the amenities field when displaying the advert.
If it is in checkbox write html code like now use $checkeg = $_POST["your checkbox name"]; then insert the $checkeg to the table or to the db