vendredi 3 juin 2016

Check database table with multible inputs

So I made a forum where you can ask qustions for muscians. I have this form where you can select multible checkboxes of what kinda musicans you wanna talk to. With the POST data I did the following:

$result = implode(", ",$_POST['sub']);

And insertet it into a database table looking like this:

l id: l topicname l genre l Subgenre l

l  1  l   music  l Metal l Heavy, Thrash l

So what I want is only musicians that have signed up on the site with either heavy or Thrash can interact with this forum topic. I know how to check it normally if there was only 1 varrable in the table but now there is two and I have no clue how to solve this problem.




Aucun commentaire:

Enregistrer un commentaire