[FX.php List] Re-populating $_POST form data

Jonathan Schwartz jschwartz at exit445.com
Fri Oct 24 11:02:49 MDT 2008


Errr...that's what I was attempting to do. Up until now, I used 
$_SESSION variables, and I can't do that in this project.  I assumed 
that you could just set the $_POST variables from FMP query, and once 
set they would display and then POST when the form was submitted 
again.

No?

Well...No reason why I can't switch to PLAN C...using regular 
variables. Is that the common wisdom?

If this were to be done, then, what would the syntax be for setting 
those variables in a loop?  It's the lopping thing that is hanging me 
up.  This is the first time that I'm refusing to write 80 discrete 
statements to set the form variables....in favor of a more elegant 
loop.

  foreach($findResult['data'] as $key => $value)

  	{

	?????????

	}

Jonathan

At 9:27 AM -0700 10/24/08, Troy Meyers wrote:
>Jonathan,
>
>Are you really wanting to SET the $_POST variables? Don't you want 
>to be reading them out of the incoming POST (or perhaps a find 
>result) into a variable array and input fields for display and 
>re-posting when the form is submitted?
>
>Putting them into $_POST isn't going to propagate them to the next page.
>
>Maybe I'm misunderstanding your goal here.
>
>-Troy
>
>
>>  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
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list


-- 
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-370-5011


More information about the FX.php_List mailing list