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

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -