How To Delete Data Using Checkbox?

I need php coding to delete data

I want to make sure that the data deleted

#only data that is checked can be deleted
#data that are not checked cannot be deleted

so plz..........
help a programmer..

PS:
The situation is like the email system when user can choose which email they want to delete

Comments

  • The best way to do it is by using an array.

    This should look like your form:
    [code]
    echo "";
    echo "";
    echo " $state){
    if ($state!=$oldactive[$id])
    }
    [/code]

    password stuff etc
    [code]
    $query="UPDATE databse SET active='$state', posted='$date' WHERE id='$id' ";
    mysql_query($query);
    mysql_close();
    echo "Record Updated
    ";
    [/code]

    Hope this helps you out. Good luck,
    --=][tReShR][=--

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion