sql checkboxes php form -
can please me? wanted little "system" when click on checkbox sql statement executed. example statement :
select * customers id = 6;
if can me great.
i ajax
html
<input type='checkbox' onclick'clicked();'>
javascript+jquery
function clicked(){ $.ajax({ type: "get", url: "phpfile.php", data:{checked:$("checkboxselector")[0].checked} }) }
php
//phpfile.php $checked = isset($_get['checked']) && $_get['checked'] == "true" ?1:0; if($checked){ $query = "select * customers id = ''"; // execute query }
Comments
Post a Comment