Posted by Pedro Graca on 10/22/06 20:17
James54321 wrote:
> btw i forgot to say that your code is great (afaik) but i dont quite
> know what the bit after each case does ie the bit in between case1:
> THIS BIT and break;
> :S
If I remember correctly from my last post you mean the function calls
with the id.
switch ($value) {
case 0: break;
case 1: submission_delete_or_whatever_it_was($key); break;
}
Well, that `submission_delete_or_whatever_it_was` is a function that
deletes (or something else) the submission of the id $key.
You are expected to code it :)
It will be something like
function submission_delete_or_whatever_it_was($id) {
$validated_id = (int)$id;
if ($validated_id < 1) return false;
$sql = "delete from TABLE where ID=$validated_id";
if (mysql_query($sql)) return mysql_affected_rows()
else return false;
}
--
I (almost) never check the dodgeit address.
If you *really* need to mail me, use the address in the Reply-To
header with a message in *plain* *text* *without* *attachments*.
Navigation:
[Reply to this message]
|