<?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: Redirect form to itself?</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Redirect form to itself?</description>
<language>en</language>
<pubDate>Wed, 06 May 2026 00:06:15 +0000</pubDate>

<item>
<title>tbenko on "Redirect form to itself?"</title>
<link>https://www.machform.com/forums/topic/redirect-form-to-itself#post-5787</link>
<pubDate>Sat, 09 May 2009 16:55:12 +0000</pubDate>
<dc:creator>tbenko</dc:creator>
<guid isPermaLink="false">5787@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Dear Yuniar!&#60;br /&#62;
Yes, I have tried. And I can get the value I need. My roblem is about the redirect function built in machform. When submitting the form everything works well in all browsers except SAFARI. For some reason SAFARI keeps loading the page forever. Can you please take a look at the demo page I made to see what I mean? Thank you.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://lopottlaptop.hu/check.php.&#34; rel=&#34;nofollow&#34;&#62;http://lopottlaptop.hu/check.php.&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Redirect form to itself?"</title>
<link>https://www.machform.com/forums/topic/redirect-form-to-itself#post-5785</link>
<pubDate>Sat, 09 May 2009 07:40:45 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">5785@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Have you tried the above modifications?
&#60;/p&#62;</description>
</item>
<item>
<title>tbenko on "Redirect form to itself?"</title>
<link>https://www.machform.com/forums/topic/redirect-form-to-itself#post-5778</link>
<pubDate>Thu, 07 May 2009 23:01:39 +0000</pubDate>
<dc:creator>tbenko</dc:creator>
<guid isPermaLink="false">5778@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi! Yes what I ment is is getting field values from previous submission. But when submitting the page that loads the form and should show results, the page does not load correctly in al browsers (ie. safari). Please try this address: &#60;a href=&#34;http://lopottlaptop.hu/check.php.&#34; rel=&#34;nofollow&#34;&#62;http://lopottlaptop.hu/check.php.&#60;/a&#62;&#60;br /&#62;
I think the following code from the embedded form makes the page load forever:&#60;br /&#62;
&#60;code&#62;&#38;lt;script type=&#34;text/javascript&#34;&#38;gt;top.location = '../check.php'&#38;lt;/script&#38;gt;&#60;/code&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Redirect form to itself?"</title>
<link>https://www.machform.com/forums/topic/redirect-form-to-itself#post-5773</link>
<pubDate>Thu, 07 May 2009 20:42:16 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">5773@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi tbenko,&#60;/p&#62;
&#60;p&#62;I'm not sure with your request, but maybe what you mean is getting a field value from submitted form, from previous submission. Let's try this customization, in here I assume you want to store a value from &#34;text field&#34; with element id = 1 in form 50 :&#60;/p&#62;
&#60;p&#62;1. Edit &#34;include/post-functions.php&#34; and go around line 178, you will see this :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$table_data[$element_name] = $element_data;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;add these code below that line &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($form_id == 50 &#38;#38;&#38;#38; $element_id == 1) {
	$_SESSION[&#38;quot;user_data&#38;quot;] = $element_data;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;2. Edit &#34;includes/view-functions.php&#34; and go around line 36 ~ 38, you will see this code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if(isset($element-&#38;gt;populated_value[&#38;#39;element_&#38;#39;.$element-&#38;gt;id][&#38;#39;default_value&#38;#39;])){
	$element-&#38;gt;default_value = $element-&#38;gt;populated_value[&#38;#39;element_&#38;#39;.$element-&#38;gt;id][&#38;#39;default_value&#38;#39;];
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;add these code below that line &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($element-&#38;gt;id == 1 &#38;#38;&#38;#38; !empty($_SESSION[&#38;#39;user_data&#38;#39;])) {
	$element-&#38;gt;default_value = $_SESSION[&#38;#39;user_data&#38;#39;];
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;3. In your page, machform form will embedded something like this :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;require(&#38;quot;my_path&#38;quot;);
$mf_param[&#38;#39;form_id&#38;#39;] = myform_id;
$mf_param[&#38;#39;base_path&#38;#39;] = &#38;#39;my_base_path&#38;#39;;
display_machform($mf_param);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;put this code in the end of embed code &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;unset($_SESSION[&#38;quot;user_data&#38;quot;]);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Make sure you adjust the form and element id with yours
&#60;/p&#62;</description>
</item>
<item>
<title>tbenko on "Redirect form to itself?"</title>
<link>https://www.machform.com/forums/topic/redirect-form-to-itself#post-5760</link>
<pubDate>Thu, 07 May 2009 06:52:11 +0000</pubDate>
<dc:creator>tbenko</dc:creator>
<guid isPermaLink="false">5760@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;My PHP looks like this now (maybe this gives a clue what I did):&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
session_start();&#60;br /&#62;
	if($_SESSION['is_valid_user'] == true){&#60;br /&#62;
		//die(&#34;You are not authorized to see this page&#34;);&#60;br /&#62;
		//better not die cause the form will not apear&#60;br /&#62;
		//but only in this case we'll have the submitted data&#60;br /&#62;
		echo &#34;Session found&#34;;&#60;br /&#62;
		//here comes whatever code i would like&#60;br /&#62;
	} else {&#60;br /&#62;
		echo &#34;Session not found&#34;;&#60;br /&#62;
	}&#60;br /&#62;
	session_destroy();&#60;/p&#62;
&#60;p&#62;	require(&#34;my_path&#34;);&#60;br /&#62;
	$mf_param['form_id'] = myform_id;&#60;br /&#62;
	$mf_param['base_path'] = 'my_base_path';&#60;br /&#62;
	display_machform($mf_param);&#60;br /&#62;
&#60;/code&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>tbenko on "Redirect form to itself?"</title>
<link>https://www.machform.com/forums/topic/redirect-form-to-itself#post-5759</link>
<pubDate>Thu, 07 May 2009 06:38:59 +0000</pubDate>
<dc:creator>tbenko</dc:creator>
<guid isPermaLink="false">5759@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I tried to create a PHP file, the form is redirected to,&#60;br /&#62;
In the PHP file displaying I would like to display some values from the submitted form.&#60;br /&#62;
But under the values, I would like to include the same form, so it could be submitted again if needed...&#60;br /&#62;
Question: is this possible? Any suggestions how to do this?&#60;br /&#62;
I think i have generated somehow an infinite loop or something cause on submit of the PHP included form the PHP shows empty page and keeps loading forever...&#60;br /&#62;
Thanks in advance.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
