RE: [PHP-DB] handling of checkboxvalues
| From: | Bastien Koert | Date: | Sat, 11 Feb 2006 17:43:57 +0000 |
| Subject: | RE: [PHP-DB] handling of checkboxvalues | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-41224@lists.php.net to get a copy of this message | ||
Give the checkbox value the id of the record to be deleted...if its checked, then you can simply do an in string check in the sql
<input type='checkbox' name='user_loeschen value='".[User-ID]."'>
$sql = "delete from table where id in ("{$_POST['user_loeschen']}";
bastien
From: Ruprecht Helms <rhelms@my-mail.ch> Reply-To: rhelms@my-mail.ch To: php-db@lists.php.net Subject: [PHP-DB] handling of checkboxvalues Date: Sat, 11 Feb 2006 17:48:48 +0100 Hi, I want to have a function that delete some customers. The customers will be selected by cklicking on in checkboxes. This is the line I codes the checkboxes: <input type='checkbox' name='user_loeschen[] value="id" id=".[User-ID]."> How can I use the checkboxvariable within another script and handle the id-value? I little codescripplet will help me. Regards, Ruprecht -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php