I am trying to send link id's to a sql query in order to filter data.
When I click a link like the ones below, I want to send the id of the link to the sql query as shown below:
Example: Links (clicked):
<p>Fitler Results</p>
<a href="#" class="category" id="marketing">Marketing</a>
<a href="#" class="category" id="automotive">Automotive</a>
(not clicked):
<a href="#" class="category" id="sports">Sports</a>
sql query - I hardcoded the id's in, but I want it to do that automatically when someone clicks a link, in this case marketing and automotive, I want the id's to insert automatically using jquery but have no idea how to properly do it:
$query1 = "SELECT * FROM explore WHERE category IN ('marketing', 'automotive',) ORDER BY category LIMIT $start, $limit";