handling of checkboxvalues

handling of checkboxvalues

am 11.02.2006 17:48:48 von Ruprecht Helms

Hi,

I want to have a function that delete some customers. The customers will
be selected by cklicking on in checkboxes. This is the line I codes the
checkboxes:



$sql = "delete from table where id in ("{$_POST['user_loeschen']}";



bastien

>From: Ruprecht Helms
>Reply-To: rhelms@my-mail.ch
>To: php-db@lists.php.net
>Subject: [PHP-DB] handling of checkboxvalues
>Date: Sat, 11 Feb 2006 17:48:48 +0100
>
>Hi,
>
>I want to have a function that delete some customers. The customers will be
>selected by cklicking on in checkboxes. This is the line I codes the
>checkboxes:
>
> for($i=0;count($_POST['user_loeschen'])<$i;$i++){
--- put here your sql statement to delete user ---
ej... delete from users where id = '{$_POST['user_loeschen'][$i]}'
---------------------------
}
}

?>

form name='my_form' method='post' action='form.php'
ENCTYPE='multipart/form-data'
> ENCTYPE='multipart/form-data'
> ";
?>



--------------080009010604000002090506
Content-Type: text/plain; charset=us-ascii

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--------------080009010604000002090506--

Re: handling of checkboxvalues

am 12.02.2006 13:57:57 von Ruprecht Helms

Hi Luis,

> you can do this...
>
>
> form.php
> ----------------------------------------------------
> >
> if($_POST['submit'] == 'send form'){
> for($i=0;count($_POST['user_loeschen'])<$i;$i++){
> --- put here your sql statement to delete user ---
> ej... delete from users where id = '{$_POST['user_loeschen'][$i]}'
> ---------------------------
> }
> }
>
> ?>
>
> form name='my_form' method='post' action='form.php'
> ENCTYPE='multipart/form-data'
> value='{$aus_konto['konto']}'>";
?>

Or over html :

"'>"

On this way both samples must be ok.....


Good luck....

Luis Morales


On Sun, 2006-02-12 at 10:33 +0100, Ruprecht Helms wrote:
> Luis Morales wrote:
> > Well,
> >
> > you can do this...
> >
> >
> >
> > form name='my_form' method='post' action='form.php'
> > ENCTYPE='multipart/form-data'
> >