RE: [PHP] Displaying the table records along with check boxes.
| From: | Balaji Ankem | Date: | Wed, 03 Jul 2002 12:30:58 +0000 |
| Subject: | RE: [PHP] Displaying the table records along with check boxes. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105155@lists.php.net to get a copy of this message | ||
Hi John,
Thanks for the reply. Here the thing is I already tried and I
desparately need urgently, thats why I mailed to the group.
Anyway thanx for u'r suggestion.
Rgds
Balaji
-----Original Message-----
From: 1LT John W. Holmes [mailto:holmes072000@charter.net]
Sent: Wednesday, July 03, 2002 5:56 PM
To: Balaji Ankem; php-general@lists.php.net
Subject: Re: [PHP] Displaying the table records along with check boxes.
The code to create a check box is:
<input type="checkbox" name="whatever" value="something">
HTH,
---John Holmes...
PS: It might help if you actually try to do something yourself and then
ask a question. We're not here to feed you code. Anyways, a way you
might approach it is to name all of your checkboxes the same, something
like
<input type="checkbox" name="delete[]" value="$id">
Where $id is a unique identifier for the row/field/etc... Then, you
simply use some code like this to delete all of the rows where the box
was checked.
<?
$delete_ids = implode(",",$_REQUEST['delete']);
$result = mysql_query("DELETE FROM your_table WHERE id IN
($delete_ids)"); ?>
HTHSM,
---John Holmes...
----- Original Message -----
From: "Balaji Ankem" <balaji.ankem@wipro.com>
To: <php-general@lists.php.net>
Sent: Wednesday, July 03, 2002 8:05 AM
Subject: [PHP] Displaying the table records along with check boxes.
> Hi friend,
> I would like to display the table records along with check boxes for
> the purpose of
> selecting particular records or select all and for deleteing them
or
> for other purpose.
>
> Anybody have ready made code for this type...
>
> Any help would be greatly appreciated.
>
> Thanks and Regards
> Balaji
>
>
------------------------------------------------------------------------
----
----
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
**************************Disclaimer************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ***************************************************************************
**************************Disclaimer************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ***************************************************************************