Hi, I've created a search form for a script in php. Basicaly this form have some checkboxes and a submit button. Each checkbox is a category, if I check one or more checkboxes the result is filtered by thoose categories.
Here is the html code:
<?php
if ($_POST['do_search'] == 'true') {
$results = 'Do the query and store results in the $results var';
}
?>
<form method="post" action="search.php" id="search">
<input type="checkbox" name="categories[]" id="categories[]" value="1">Category 1
<input type="checkbox" name="categories[]" id="categories[]" value="2">Category 2
<input type="checkbox" name="categories[]" id="categories[]" value="3">Category 3
<input type="submit" name="submit">
<input type="hidden" id="do_search" value="true">
</form>
<div id="search_results">
<?php echo $results; ?>
</div>
I'm trying to get the result inline with ajax, for most parts of my script I use JQuery. Anyone can help me to figure out how to pass the $_POST data in realtime through ajax, without reload the page?
p.s. I'm sorry for my poor english, I hope I was clear enough :|