Hi all,
I am new to jquery and php but I am trying to use a checkbox to grab stuff from a mysql database.
To further explain, I want a checkbox and when checked it will place the id of the checkbox in a mysql query and display the results from the database.
So, if I check off this box:
<input name="apple" type="checkbox" id="apple" /><label for="apple">Apple</label>
It will send the id or class name (apple) to the php sql query and gather the results.
I am not entirely sure how to do this so if someone can help that would be great thanks.
EDIT
I have a php query that looks like this:
$query1 = "SELECT * FROM explore WHERE category='apple' ORDER BY category";
That query just displays the category with 'apple'
I'm not sure how to go from jquery to php by passing the id's for the query. How do I get the id of the checkbox to go into the php page for the "category= "?