Re: Can anyone help me? i'm getting crazy... : |

From: Date: Mon, 03 Feb 2003 22:17:56 +0000
Subject: Re: Can anyone help me? i'm getting crazy... : |
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134187@lists.php.net to get a copy of this message
User "Mr. Bungl3" <mrbungle@netcabo.pt> wrote: > I'm trying to delete a some records from a table with checkboxes and then i > have this code: > $sql="DELETE FROM divx where id=".$del[$i].""; Great idea, but when checkbox is checked, variable of it's name just becomes true (doesn't get value of it's index anyway). So, I'd write it this way: if ($del[$i]) { $sql="DELETE FROM divx WHERE id='".$i."'"; mysql_query...; }

« previous php.general (#134187) next »