<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Need to get form data after form is submitted $_POST.</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Need to get form data after form is submitted $_POST.</description>
<language>en</language>
<pubDate>Wed, 16 Sep 2026 23:55:45 +0000</pubDate>

<item>
<title>yuniar on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10952</link>
<pubDate>Mon, 29 Nov 2010 17:00:22 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">10952@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Actually, that is the intended behaviour, since the phone number being saved into the database doesn't include any dashes.&#60;/p&#62;
&#60;p&#62;I suppose you will need to extract it manually.
&#60;/p&#62;</description>
</item>
<item>
<title>Steve1951 on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10945</link>
<pubDate>Sun, 28 Nov 2010 11:34:57 +0000</pubDate>
<dc:creator>Steve1951</dc:creator>
<guid isPermaLink="false">10945@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Everything worked great with one exception.&#60;/p&#62;
&#60;p&#62;As listed in the referenced post, I added the following lines in post-functions.php&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$_SESSION[&#38;#39;is_valid_user&#38;#39;] = true;
$_SESSION[&#38;#39;form_data&#38;#39;] = $table_data;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;All values were returned as expected with one exception.  Element_8 is a phone number.  What I expected in $_SESSION['form_data']['element_8_*']  for phone number 123-456-7890 was&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[element_8_1] =&#38;gt; 123
[element_8_2] =&#38;gt; 456
[element_8_3] =&#38;gt; 7890&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;in the same manner as an address field.&#60;/p&#62;
&#60;p&#62;But what I got was&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[element_8] =&#38;gt; 1234567890&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Obviously I can extract the three groups of numbers from the complete phone number in my PHP script, or I can add lines to post-functions.php to assign $_SESSION['form_data']['element_8_*'] from $user_input['element_8_*']  but I wanted to check to see why it functions this way.  I prefer to keep everything clean without making exceptions for certain types of fields.
&#60;/p&#62;</description>
</item>
<item>
<title>Steve1951 on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10943</link>
<pubDate>Sat, 27 Nov 2010 04:11:22 +0000</pubDate>
<dc:creator>Steve1951</dc:creator>
<guid isPermaLink="false">10943@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks - That should work.  I'll give it a try.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10939</link>
<pubDate>Fri, 26 Nov 2010 12:53:39 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">10939@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Ah... I see. I was assuming that you didn't use the &#34;form review&#34; option for your form. My mistake.&#60;/p&#62;
&#60;p&#62;The above code should work if you don't have form review enabled.&#60;/p&#62;
&#60;p&#62;If you need to have form review enabled, then we need to modify the post-functions.php file to store the form variables into session there.&#60;/p&#62;
&#60;p&#62;It should be similar as this:&#60;br /&#62;
&#60;a href=&#34;http://www.appnitro.com/forums/topic/how-to-limit-access-to-redirect-page-after-submission?replies=19#post-3176&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/forums/topic/how-to-limit-access-to-redirect-page-after-submission?replies=19#post-3176&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Is that okay for you?
&#60;/p&#62;</description>
</item>
<item>
<title>Steve1951 on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10937</link>
<pubDate>Fri, 26 Nov 2010 02:45:08 +0000</pubDate>
<dc:creator>Steve1951</dc:creator>
<guid isPermaLink="false">10937@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Probably more my confusion than your instructions.  After clicking &#34;Continue&#34; on the form input page, the data in arrays &#60;code&#62;$_POST&#60;/code&#62; and &#60;code&#62;$_SESSION[&#38;#39;post_data&#38;#39;]&#60;/code&#62; are identical and properly contain the data that was entered on the form.&#60;/p&#62;
&#60;p&#62;The print_r data is again displayed just before the &#34;Review Your Entry&#34; screen is displayed.  This time the print_r data is&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;This is print_r for POST
Array ( )
This is print_r for SESSION
Array ( )&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and of course when the redirected URL script (on the same server) is executed, the $_SESSION['post_data'] is empty.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10931</link>
<pubDate>Thu, 25 Nov 2010 22:33:43 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">10931@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Sorry if I wasn't clear. Try to submit your form and let me know what the result is.&#60;br /&#62;
The empty result above is make sense if the form not being submitted indeed.
&#60;/p&#62;</description>
</item>
<item>
<title>Steve1951 on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10930</link>
<pubDate>Thu, 25 Nov 2010 20:59:25 +0000</pubDate>
<dc:creator>Steve1951</dc:creator>
<guid isPermaLink="false">10930@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;What is displayed is &#60;/p&#62;
&#60;p&#62;&#60;code&#62;Array ( ) Array ( )&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;and that makes sense since the &#60;code&#62;print_r($_POST);&#60;/code&#62; command is before the form is displayed and posted.  I would expect $_POST to be empty since the form has not yet posted.  It seems the &#60;code&#62;$_SESSION[&#38;#39;post_data&#38;#39;] = $_POST;&#60;/code&#62; line should be after the post data has been submitted.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10929</link>
<pubDate>Thu, 25 Nov 2010 18:27:21 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">10929@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;That's weird. Is that the only data within the variable?&#60;br /&#62;
It should contains lot more data there (all your form fields data).&#60;/p&#62;
&#60;p&#62;Unless there is some problem with the $_POST variable before saving it into the session.&#60;/p&#62;
&#60;p&#62;Try to do this and let me know what's the result:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
        print_r($_POST);
        $_SESSION[&#38;#39;post_data&#38;#39;] = $_POST;
        print_r($_SESSION[&#38;#39;post_data&#38;#39;]);
	require(&#38;quot;/mysite/machform-test/machform.php&#38;quot;);
	$mf_param[&#38;#39;form_id&#38;#39;] = 14;
	$mf_param[&#38;#39;base_path&#38;#39;] = &#38;#39;http://localhost/machform-test/&#38;#39;;
	display_machform($mf_param);
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>Steve1951 on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10919</link>
<pubDate>Wed, 24 Nov 2010 22:35:03 +0000</pubDate>
<dc:creator>Steve1951</dc:creator>
<guid isPermaLink="false">10919@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I still need a little assistance here.  I'm not sure how to access the data in the redirected page.  As a test I did a&#60;/p&#62;
&#60;p&#62;&#60;code&#62;print_r($_SESSION[&#38;#39;post_data&#38;#39;]);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;and this returned&#60;/p&#62;
&#60;p&#62;&#60;code&#62;Array ( [id] =&#38;gt; 4 [review_submit] =&#38;gt; Submit )&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;How do I access the data in the redirected page?&#60;/p&#62;
&#60;p&#62;As a temporary workaround I have modified /includes/post-functions.php and placed the data I need in SESSION variables and that works fine, but I would prefer not to modify your code.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10918</link>
<pubDate>Wed, 24 Nov 2010 11:26:02 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">10918@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;It should be right above your advanced form code.&#60;br /&#62;
So let say you are having this advanced form code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
	require(&#38;quot;/mysite/machform-test/machform.php&#38;quot;);
	$mf_param[&#38;#39;form_id&#38;#39;] = 14;
	$mf_param[&#38;#39;base_path&#38;#39;] = &#38;#39;http://localhost/machform-test/&#38;#39;;
	display_machform($mf_param);
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You can modify it to be like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
        $_SESSION[&#38;#39;post_data&#38;#39;] = $_POST;
	require(&#38;quot;/mysite/machform-test/machform.php&#38;quot;);
	$mf_param[&#38;#39;form_id&#38;#39;] = 14;
	$mf_param[&#38;#39;base_path&#38;#39;] = &#38;#39;http://localhost/machform-test/&#38;#39;;
	display_machform($mf_param);
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Also, to ensure that the session variable is working properly, insert the code below into the first line of the page where you embed your form AND the redirected page:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php session_start(); ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>Steve1951 on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10916</link>
<pubDate>Wed, 24 Nov 2010 10:55:06 +0000</pubDate>
<dc:creator>Steve1951</dc:creator>
<guid isPermaLink="false">10916@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Are you saying to place the above referenced $_SESSION assignment just above the &#34;function process_form($input){&#34; statement in file /includes/post-functions.php?&#60;/p&#62;
&#60;p&#62;If not there, where?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Steve
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10915</link>
<pubDate>Wed, 24 Nov 2010 09:57:26 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">10915@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;If the redirected page is within the same domain, then the easiest way to get the form data is by saving the $_POST data into a $_SESSION variable.&#60;/p&#62;
&#60;p&#62;So, right above the form code, you could do something like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$_SESSION[&#38;#39;post_data&#38;#39;] = $_POST;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You can then access this session variable easily from your other pages.
&#60;/p&#62;</description>
</item>
<item>
<title>Steve1951 on "Need to get form data after form is submitted $_POST."</title>
<link>https://www.machform.com/forums/topic/need-to-get-form-data-after-form-is-submitted-_post#post-10914</link>
<pubDate>Tue, 23 Nov 2010 23:24:44 +0000</pubDate>
<dc:creator>Steve1951</dc:creator>
<guid isPermaLink="false">10914@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Just purchased MachForm and have created my first form.  I have integrated the form into a page using the advanced form code and the form is completing properly.&#60;/p&#62;
&#60;p&#62;I need to pass some data from the form to the program specified in the redirect URL.  Normally I would retrieve the data using the $_POST function ($_POST['element_2_1']) but the $_POST data doesn't seem to be available to the redirected program.&#60;/p&#62;
&#60;p&#62;What is the proper method to pass form data to the redirected program?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Steve
&#60;/p&#62;</description>
</item>

</channel>
</rss>
