Re: [PHP-WIN] RE: [PHP] Deleting multiple items from database using checkboxes

2002-10-08 Thread 1LT John W. Holmes
To: <[EMAIL PROTECTED]>; "Php-Windows Mailing" <[EMAIL PROTECTED]> Sent: Tuesday, October 08, 2002 11:07 AM Subject: RE: [PHP-WIN] RE: [PHP] Deleting multiple items from database using checkboxes > Hi John, > > I have done this now but it gives an error message : Warni

RE: [PHP-WIN] RE: [PHP] Deleting multiple items from database using checkboxes

2002-10-08 Thread Davy Obdam
Hi John, I have done this now but it gives an error message : Warning: Bad arguments to implode() in C:\Program Files\Apache Group\Apache2\htdocs\davy\guestbook2002\functions.php on line 318 It seems like the array $dele is empty to me, but i am not sure. This is my code //Make query $ids = "'"

WG: [PHP-WIN] Re: [PHP] Deleting multiple items from database using checkboxes

2002-10-08 Thread Philipp Lutz
4 95 35 49 0211 5 07 22 13 > -Ursprüngliche Nachricht- > Von: Ing. Raúl González Rodríguez [mailto:[EMAIL PROTECTED]] > Gesendet: Montag, 7. Oktober 2002 22:48 > An: Php Mailinglist; Php-Windows Mailing > Betreff: [PHP-WIN] Re: [PHP] Deleting multiple items from database

[PHP-WIN] RE: [PHP] Deleting multiple items from database using checkboxes

2002-10-07 Thread John W. Holmes
I think someone already mentioned this, but you can also do this: if(isset($dele) && count($dele) > 0) { $ids = "'" . implode("','",$dele) . "'"; $sql = "delete from gastenboek where entryID IN ($ids)"; $result = mysql_query($sql); } might want to add in a is_array() somewhere in there...

[PHP-WIN] Re: [PHP] Deleting multiple items from database using checkboxes

2002-10-07 Thread Ing. Raúl González Rodríguez
You can use the following code to delete multiple items: if(isset($dele) && (count($dele) > 0)) { $sql = "delete from gastenboek where (entryID='$dele[0]')"; for($i=1; $i To: "Php Mailinglist" <[EMAIL PROTECTED]>; "Php-Windows Mailing" <[EMAIL PROTECTED]> Sent: Monday, October 07, 200

[PHP-WIN] Re: [PHP] Deleting multiple items from database using checkboxes

2002-10-07 Thread Marco Tabini
Try WHERE EntryID IN (" . implode ($dele, ',') . ")" However: 1) Anybody could fake a form post or query url to delete any data in your database 2) It would also be possible to create a more dangerous post that could give the attacker control over your entire database Thus, I assume that you wi