[FX.php List] Edit multiple records/portal / how to pass the data?

Leo R. Lundgren leo at finalresort.org
Sun Jan 15 09:40:42 MST 2012


You need to make the fields arrays by naming them -recid[x] and size[x]. Normally you use a loop to produce the x being 1,2,3 etc. Then in the server side you will see an array in the $_POST data, and can loop that to process the input.

15 jan 2012 kl. 17.38 skrev Denis Somar:

> Dear FXers,
> 
> I've read up on the two primary methods of editing multiple records: one big edit via portals vs. calling FMedit in a loop for each record.
> 
> I understand portals is faster.
> 
> What I'm trying to understand and ascertain is if my edit form with each record row is passing unique info via Submit/POST that the results page can manage the edit process.  My edit page's generated HTML, simplified, looks like this:
> 
> <form method="post" action"results.php">
> <tr><td>
>     <input name="-recid" value="1">
>     <input name="size" value="xx">
> </tr></td>
> <tr><td>
>     <input name="-recid" value="4">
>     <input name="size" value="yy">
> </tr></td>
> <tr><td>
>     <input name="-recid" value="5">
>     <input name="size" value="zz">
> </tr></td>
> <input type="submit" value="Save Changes" name="submit">
> </form>
> 
> I think the above is correct, but when I print_r($_POST) on the results page, I see this:
> 
> Array
> (
>     [submit] => Save Changes
>     [-recid] => 4
>     [size] => zz
>     [FoundCount] => 2
> )
> 1
> Thus I'm not sure if editing on my results page will work. Any help/thoughts are appreciated!
> 
> Best,
> Denis
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



-|

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20120115/1ae5f78b/attachment.html


More information about the FX.php_List mailing list