Re: php and checkboxes.

From: Date: Mon, 29 Sep 2003 13:18:53 +0000
Subject: Re: php and checkboxes.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164238@lists.php.net to get a copy of this message
From: "Angelo Zanetti" <binc2@ctech.ac.za> > I dont actually want to delete the record from the database, perhaps I wasnt > very clear in my explanation, but I just need to remove that entry from the > table. > > kinda like when deleting mail from your web email account like hotmail. Same idea... <input type="checkbox" name="remove[]" value="xx"> Where xx is the ID of that entry/row. Then, to select whatever is in the table, minus whatever was selected... $list = implode(',',$_POST['remove']); $query = "SELECT * FROM Table WHERE id NOT IN ($list)"; If you want this "list" to propagate each time things are selected, then you'll have to "remember" what's been selected using the session or hidden elements. ---John Holmes...

« previous php.general (#164238) next »