it is possible to pass checkboxes to a GET URL as an array and the insert them into a mysql query to find all items that were checked
sure as long as they are in the form and they have a value and a name they should be sent in the GET along with the rest of the values
Just to clarify, that in a form would result in ?pie=pie if checked. Dead simple really. The best way to retrieve checkbox statuses is probably isset($_GET['pie']), after all, for a checkbox all that matters is - if its set or not. Dan
i am sorry , i am talking about passing mulitple checkbox to the URL so it would be <input type="checkbox" id=checkbox name="pie[]" value="on"> <input type="checkbox" id=checkbox name="pie[]" value="on"> <input type="checkbox" id=checkbox name="pie[]" value="on"> when it passes to the URL is passes as pie=array then i implode it to query my problem is that i need to pass it back to my pagination and sort URLs and I am not sure how to do that.
First of all get checkboxes values. creat a string of that values and pass it as hidden variable of form. then u can fetch that value in pagination. it's like <html> <head> <script language="javascript"> function myPieData(val) { document.getElementById("pieData").value = val; } </script> </head> <body> <?php $val = 'Test'; if($_POST) { $checkData = $_REQUEST['pie']; if(count($checkData) > 0) { $val = implode(",",$checkData); } else { $val = ""; } echo "<script language='javascript'>myPieData('".$val."');</script>"; } ?> <form name="frm" action="checkboxUrl.php" method="post"> <input type="hiddent" name="pieData" id="pieData"/> <input type="checkbox" id=checkbox name="pie[]" value="a"> <input type="checkbox" id=checkbox name="pie[]" value="b"> <input type="checkbox" id=checkbox name="pie[]" value="c"> <input type="submit" name="btnSubmit" value="Submit"> </form> </body> </html>