RE: [PHP] Passing marked rows in a table

2004-11-02 Thread Pablo Gosse
[snip] Pablo Gosse wrote: > [snip] > If the elements all live within the same form, you can add [] to the >end of the name/id attribute, and then all checkboxes with the > same name will be accessible in an array. So "checkboxname[]" will > show up as $_POST['checkboxname'] on the receiving en

Re: [PHP] Passing marked rows in a table

2004-11-02 Thread Todd Cary
[snip] If the elements all live within the same form, you can add [] to the end of the name/id attribute, and then all checkboxes with the same name will be accessible in an array. So "checkboxname[]" will show up as $_POST['checkboxname'] on the receiving end. [/snip] Can I do $MyArray = $_POST

RE: [PHP] Passing marked rows in a table

2004-11-02 Thread Vail, Warren
Assuming you have an artificial key for your table (like an auto increment column), I would place the key field to the table on your form in the value of the checkbox; When the form is returned to your "post" php script it will only receive those checkboxes that are checked and they will come lo

RE: [PHP] Passing marked rows in a table

2004-11-02 Thread Pablo Gosse
[snip] I create a list of records from a DB and each has a check box. What is the best way to select those that were checked after the form is submitted? [/snip] If the elements all live within the same form, you can add [] to the end of the name/id attribute, and then all checkboxes with the sa

Re: [PHP] Passing marked rows in a table

2004-11-02 Thread Greg Donald
On Tue, 02 Nov 2004 13:38:03 -0800, Todd Cary <[EMAIL PROTECTED]> wrote: > I create a list of records from a DB and each has a check box. What is > the best way to select those that were checked after the form is submitted? Have a look at how the form data is coming across, you should see the ans

RE: [PHP] Passing marked rows in a table

2004-11-02 Thread Jay Blanchard
[snip] I create a list of records from a DB and each has a check box. What is the best way to select those that were checked after the form is submitted? [/snip] Loop through the results of the checkbox array which should be associated with a value from the database and do your selection based o