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

Troy Meyers tcmeyers at troymeyers.com
Fri Oct 24 12:01:21 MDT 2008


Jonathan,

$_POST is populated with the POSTed data from the prior page. Though you can change values and add elements, that's not normally done.

To send data to the next page via the POST mechanism, you need to have <input> or similar elements inside of the <form> region on the source page. It is the <input> data that is POSTed to the next page. You certainly can pre-set the values of the <input> fields with data from a FIND. Looping should be possible, though you may have an issue with the order the loop lays down the visible fields.

But first, are all the fields from the FileMaker find the same kind of data? What kind?

-Troy


> 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



More information about the FX.php_List mailing list