function delete($rowid)
{
$rowids = implode(", ",$rowid);
$sql = "DELETE FROM pms WHERE id IN (".$rowids.")";
print $sql;
}
if (isset($_POST['submit']))
{
delete($rowid);
}
?>
<form method="post" action="test.php">
<input type="checkbox" name="rowid[]" value="1771367" /><br >
<input type="checkbox" name="rowid[]" value="345342" /><br >
<input type="checkbox" name="rowid[]" value="572347" /><br >
<input type="checkbox" name="rowid[]" value="902358" /><br >
<input type="checkbox" name="rowid[]" value="234654" /><br ><br >
<input type="submit" name="submit" />
</form>
Warning: implode() [function.implode]: Invalid arguments passed in C:\pub\test.php on line 4 DELETE FROM pms WHERE id IN ()
What Am I doing wrong here? Going crazy over here..