[FX.php List] Multiple records Redux

DC dan.cynosure at dbmscan.com
Wed May 16 09:25:05 MDT 2007


there is a trick...

put [] after the name in your form field as in name="namehere[]" 
value="whatever"

that will effectively send an array to PHP through POST.

dan

Jonathan Schwartz had written:
> Hi Folks,
> 
> Recently, I posted a question about retrieving multiple records from a 
> form, as in checkbox for each of the records listed from an fx.php query.
> 
> At the time, I guess it was dumb luck that I achieved the desired 
> results the first time, because now I'm not confident of the mechanics 
> when I try to retrieve *two* values from each record in the form.
> 
> It seems that the $_POST will only produce multiple records if each of 
> the  <input "name" > fields is unique.  In my first attempt, I just 
> happened to make the name field the recid, so this worked. Subsequently, 
> when I tried the more conventional approach of using name="RECORDID" and 
> value =(recid), the $_POST only delivers a single record.  I deduced 
> that the "name" value must be unique.
> 
> Moving forward, I am now trying to add another value to the $_POST 
> array.  This will not be unique (one of two values) , and will "break" 
> the $_POST scheme I desire.
> 
> The only thing that I can think to do is to concatenate the recid with 
> the new value, ensuring a unique value. The value would be passed as a 
> hidden value....and I'm not even sure that that will work.
> 
> Am I on the right track?
> 
> Thx
> 
> Jonathan
> 
> 
> 
> 


More information about the FX.php_List mailing list