[SOLVED] tutorial delete multiple rows code not working
Moderator: General Moderators
The sql statement is prone to sql injections, see http://en.wikipedia.org/wiki/SQL_injection
better use
better use
Code: Select all
$ids = join(',', array_map('intval', $_POST['checkbox']));
$query = "DELETE
FROM
`$tbl_name`
WHERE
`id` IN($ids)";
$result = mysql_query($query) or die(mysql_error($link). ': '.$query);