[FX.php List] Accepting user input on multiple records simultaneously

Erik Andreas Cayré erik at cayre.dk
Mon Apr 23 20:42:20 MDT 2007


Den 24/04/2007 kl. 9.35 skrev Jonathan Schwartz:

> Almost there with the brute force solution....
>
> So far, I have:
>         1) Added a check box to every line item in the line listing  
> of found records.
>         2) Added a form around the entire listing, with submit button.
>         3) Pointed the submit button to a new file that processes  
> the $_POST array (this is the root of the question)
>         4) perform a foreach to update each record with the -recid  
> sent over from the check box on the original page.
>
> Everything works in spite of my fumbling.  The only problem is that  
> I am using $_POST which returns exactly 1 line more than the actual  
> number of boxes checked (the input buttton name is included):
>
> [1] => 1
>     [2] => 2
>     [3] => 3
>     [32] => 32
>     [34] => 34
>     [37] => 37
>     [41] => 41
>     [44] => 44
>     [48] => 48
>     [52] => 52
>     [click] => Submit Selections
>
> So, the final loop of the foreach produces an error.
>
> Is there a better way to handle the array from the $_POST?

I'd love to see your code for the form, and the $_POST handler
(btw. did you see my idea for solving the problem in FM?)



---
Erik Andreas Cayré
Spangsbjerg Møllevej 169
DK-6705 Esbjerg Ø

Home Tel: +45 75150512
Mobile: +45 40161183

»If you can't explain it simply, you don't understand it well enough.«
-- Albert Einstein

»If you don't have time to do it right, when will you have time to do  
it over?«
-- John Wooden, basketball coach




More information about the FX.php_List mailing list