[FX.php List] Re-populating $_POST form data
Andrew Denman
adenman at tmea.org
Fri Oct 24 10:13:30 MDT 2008
I don't think you need the extra [$key], since the values have already been
pulled out of the array:
foreach($findResult['data'] as $key => $value)
{
$_POST[$key] = $value[0];
}
Andrew Denman
-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Jonathan Schwartz
Sent: Friday, October 24, 2008 9:54 AM
To: fx.php_list at mail.iviking.org
Subject: [FX.php List] Re-populating $_POST form data
Hi folks,
Am switching my way of working with form data. Where I have been
using $_SESSION to display form values, I am reverting back to using
$_POST.
<...value="<?php echo $_POST['fieldname'];?>" ...>
This a big form with a lot of fields. I am also attempting to NOT
have to discretely parse out every field individually. I'd rather use
a loop.
So, how do you parse the FMP foreach statement to re-populate $_POST
valuse, so they can be re-displayed in a form. This is my latest
attempt...but it doesn't work.
foreach($findResult['data'] as $key => $value)
{
$_POST[$key] = $value[$key][0];
}
Thanks
Jonathan
--
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-370-5011
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list