lundi 18 avril 2016

search sql from checkbox

i have a checkbox group

<input type="checkbox" name="ckflood[]" value="VerySafe"> Very Safe
<input type="checkbox" name="ckflood[]" value="Safe"> Safe
<input type="checkbox" name="ckflood[]" value="Average"> Average
<input type="checkbox" name="ckflood[]" value="Heavy"> Heavy
<input type="checkbox" name="ckflood[]" value="VeryHeavy"> Very Heavy

and this is the table

*City        Flood*
Paris       Safe-Average
Milan       Heavy
London      VeryHeavy
Rome        Average-Heavy
Athena      VerySafe

How to show city(Rome,Milan,Paris) as the result when i checked 'average' and 'heavy' checkbox Then it gives 'Rome' 100 score, 'Paris' and 'Milan' 50 Score

Aucun commentaire:

Enregistrer un commentaire