01-15-2008, 03:36 AM
|
#2 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
That code actually works perfectly for me. This is what I have:
php Code:
<?phpif(isset($_POST[ 'submit'] )){ foreach($_POST[ 'deletebox'] as $deletebox1) { $deletebox1 = (int ) $deletebox1; echo "DELETE FROM private_messages WHERE id=$deletebox1" . '<br />'; }}?>
And the HTML...
html4strict Code:
<form action="" method="post"> <input type="checkbox" class="delete-checkbox" value="1" name="deletebox[]" /> <input type="submit" name="submit" value="delete messages" /></form>
I can really only surmise that either the $_POST array is being overwritten, or that for whatever reason there are no items being posted, but I'm not sure why that would be. Is your code getting to that segment where you execute the SQL statements?
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|