[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 **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. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
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 [EMAIL PROTECTED] To: [EMAIL PROTECTED] 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
RE: [PHP] Displaying the table records along with check boxes.
Hi John, Thanks for the reply. Here the thing is I already tried and I desparately need urgently, thatÂ’s why I mailed to the group. Anyway thanx for u'r suggestion. Rgds Balaji -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 5:56 PM To: Balaji Ankem; [EMAIL PROTECTED] 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 [EMAIL PROTECTED] To: [EMAIL PROTECTED] 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. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php