Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute:

I was using simple multiple rows update using checkboxes,php and sql, but now i am moving to jquery.datatables http://www.datatables.net/

I am not able to get checkbox values in it. Any one can tell me is there any method or i am doing any mistake ?

Following is method i am using :

if (isset($_POST['checkbox'])) {
    $checkbox = $_POST['checkbox'];
    $id = "('" . implode( "','", $checkbox ) . "');" ;
    mysql_query ("update value1 from table where id in '$id'");
}

Thanks

share|improve this question
    
Your update query is wrong have a look at dev.mysql.com/doc/refman/5.0/en/update.html. You should also escape your vars to prevent sql injection. Or better use PDO or mysqli. – flec Feb 3 '13 at 14:48
    
HHmm but i am not even getting $checkbox – HaMzA Feb 6 '13 at 12:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.