<?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: embed 'Success Message' in 'template variable'</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: embed 'Success Message' in 'template variable'</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 05:19:46 +0000</pubDate>

<item>
<title>redityo on "embed 'Success Message' in 'template variable'"</title>
<link>https://www.machform.com/forums/topic/embed-success-message-in-template-variable#post-9743</link>
<pubDate>Mon, 21 Jun 2010 09:12:28 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">9743@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Sorry, I forget to remove &#34;backtick&#34; character in the code, it automatically changed to &#34;code&#34; tag in here. &#60;/p&#62;
&#60;p&#62;I've update those code, you can try to change the file again.&#60;/p&#62;
&#60;p&#62;However, if you still having difficulty with this, you can send me the file to &#60;/p&#62;
&#60;p&#62;customer.service[at]appnitro.com&#60;/p&#62;
&#60;p&#62;I will help you there
&#60;/p&#62;</description>
</item>
<item>
<title>sweetrobot on "embed 'Success Message' in 'template variable'"</title>
<link>https://www.machform.com/forums/topic/embed-success-message-in-template-variable#post-9742</link>
<pubDate>Mon, 21 Jun 2010 08:43:50 +0000</pubDate>
<dc:creator>sweetrobot</dc:creator>
<guid isPermaLink="false">9742@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Okay, gettign somewhere. Now, when the form is submitted, the following error is displayed:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;INSERT INTO ap_form_1 (&#60;code&#62;element_1&#60;/code&#62;,&#60;code&#62;element_2&#60;/code&#62;,&#60;code&#62;element_4&#60;/code&#62;,&#60;code&#62;ip_address&#60;/code&#62;,&#60;code&#62;date_created&#60;/code&#62;) VALUES ('Tom','tom@tom.com','test message','69.84.101.212','2010-06-20 21:38:38'); Query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ap_form_1 (&#60;code&#62;element_1&#60;/code&#62;,&#60;code&#62;element_2&#60;/code&#62;,&#60;code&#62;element_4&#60;/code&#62;,&#60;code&#62;ip_address&#60;/code&#62;,`date_c' at line 1&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Also, should there be two '==' in this: &#60;code&#62;if ($form_id == 1)&#60;/code&#62;?&#60;/p&#62;
&#60;p&#62;Any suggestions, or could I send the &#34;post-functions.php&#34; file to you for review? Ive uploaded the file here: &#60;a href=&#34;http://www.mediafire.com/file/mc1iqmzzwzw/post-functions.php&#34; rel=&#34;nofollow&#34;&#62;http://www.mediafire.com/file/mc1iqmzzwzw/post-functions.php&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "embed 'Success Message' in 'template variable'"</title>
<link>https://www.machform.com/forums/topic/embed-success-message-in-template-variable#post-9741</link>
<pubDate>Mon, 21 Jun 2010 07:50:54 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">9741@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;It seems you've put the code in wrong line in &#34;post-functions.php&#34; file. Maybe you're using previous version.&#60;br /&#62;
To fix this, try to search this Code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$query = &#38;quot;INSERT INTO ap_form_{$form_id}_review ($field_list) VALUES ($field_values);&#38;quot;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and you'll see the complete code like this &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if(empty($form_review)){
	$query = &#38;quot;INSERT INTO ap_form_{$form_id} ($field_list) VALUES ($field_values);&#38;quot;;
}else{ //insert to temporary table, if form review is enabled
	$query = &#38;quot;INSERT INTO ap_form_{$form_id}_review ($field_list) VALUES ($field_values);&#38;quot;;
}

do_query($query);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;then put the code bellow those complete code like this &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if(empty($form_review)){
	$query = &#38;quot;INSERT INTO ap_form_{$form_id} ($field_list) VALUES ($field_values);&#38;quot;;
}else{ //insert to temporary table, if form review is enabled
	$query = &#38;quot;INSERT INTO ap_form_{$form_id}_review ($field_list) VALUES ($field_values);&#38;quot;;
}

do_query($query);

if ($form_id == 1) {
$_SESSION[&#38;#39;page_data&#38;#39;] = $table_data;
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>sweetrobot on "embed 'Success Message' in 'template variable'"</title>
<link>https://www.machform.com/forums/topic/embed-success-message-in-template-variable#post-9739</link>
<pubDate>Mon, 21 Jun 2010 05:45:16 +0000</pubDate>
<dc:creator>sweetrobot</dc:creator>
<guid isPermaLink="false">9739@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;My man, I can't get it to work... This is what I have:&#60;/p&#62;
&#60;p&#62;1. &#34;includes/post-functions.php:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;						//for form with review enabled, append .tmp suffix to all uploaded files&#60;br /&#62;
						//move file and check for invalid file&#60;br /&#62;
						$destination_file = $input['machform_data_path'].DATA_DIR.&#34;/form_{$form_id}/files/{$element_name}-{$record_insert_id}-{$_FILES[$element_name]['name']}.tmp&#34;;&#60;br /&#62;
						if (move_uploaded_file($_FILES[$element_name]['tmp_name'], $destination_file)) {&#60;br /&#62;
							$filename = mysql_real_escape_string($_FILES[$element_name]['name']);&#60;br /&#62;
							$query = &#34;update ap_form_{$form_id}_review set $element_name='{$element_name}-{$record_insert_id}-{$filename}' where id='$record_insert_id'&#34;;&#60;br /&#62;
							do_query($query);&#60;br /&#62;
							if ($form_id == 1) {&#60;br /&#62;
	$_SESSION['page_data'] = $table_data;&#60;br /&#62;
}&#60;br /&#62;
						}&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;and&#60;/p&#62;
&#60;p&#62;2. includes/view-functions.php:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;		//check for specific form css, if any, use it instead&#60;br /&#62;
		if($form-&#38;gt;has_css){&#60;br /&#62;
			$css_dir = DATA_DIR.&#34;/form_{$form_id}/css/&#34;;&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		if($embed){&#60;br /&#62;
			$embed_class = 'class=&#34;embed&#34;';&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		if ($form_id == 1) {&#60;br /&#62;
	$form-&#38;gt;success_message = &#34;your submission has been received. a notification has also been sent to &#34; . $_SESSION['form_data']['element_2'] ;&#60;br /&#62;
}&#60;br /&#62;
        $form_markup = &#38;lt;&#38;lt;&#38;lt;EOT&#60;/code&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>sweetrobot on "embed 'Success Message' in 'template variable'"</title>
<link>https://www.machform.com/forums/topic/embed-success-message-in-template-variable#post-9730</link>
<pubDate>Sat, 19 Jun 2010 11:18:04 +0000</pubDate>
<dc:creator>sweetrobot</dc:creator>
<guid isPermaLink="false">9730@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;thanks. will try soon.
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "embed 'Success Message' in 'template variable'"</title>
<link>https://www.machform.com/forums/topic/embed-success-message-in-template-variable#post-9689</link>
<pubDate>Mon, 14 Jun 2010 10:52:52 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">9689@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;You can customize some machform files for this. Try to follow these steps :&#60;/p&#62;
&#60;p&#62;1. Edit &#34;includes/post-functions.php&#34; file and go to line 1051 for this code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;do_query($query);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;then put these code exactly bellow that line &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == 1) {
	$_SESSION[&#38;#39;page_data&#38;#39;] = $table_data;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;2. Edit &#34;includes/view-functions.php&#34; file and go to line 2229 for this code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$form_markup = &#38;lt;&#38;lt;&#38;lt;EOT&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and put these code above that line &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == 1) {
	$form-&#38;gt;success_message = &#38;quot;thank you for contacting us. a confirmation email has been sent to &#38;quot; . $_SESSION[&#38;#39;page_data&#38;#39;][&#38;#39;element_3&#38;#39;] ;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Don't forget to change the form id with yours
&#60;/p&#62;</description>
</item>
<item>
<title>sweetrobot on "embed 'Success Message' in 'template variable'"</title>
<link>https://www.machform.com/forums/topic/embed-success-message-in-template-variable#post-9686</link>
<pubDate>Sun, 13 Jun 2010 18:58:34 +0000</pubDate>
<dc:creator>sweetrobot</dc:creator>
<guid isPermaLink="false">9686@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;i would like the 'success message' to display something like this:&#60;/p&#62;
&#60;p&#62;&#34;thank you for contacting us. a confirmation email has been sent to {element_3}&#34;&#60;/p&#62;
&#60;p&#62;where {element_3} prints the address the user had entered.&#60;/p&#62;
&#60;p&#62;cheers
&#60;/p&#62;</description>
</item>

</channel>
</rss>
