<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Clear custom $_session variable on form submit</title>
		<link>https://legacy.forums.gravityhelp.com/topic/clear-custom-_session-variable-on-form-submit</link>
		<description>Gravity Support Forums Topic: Clear custom $_session variable on form submit</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 20:33:00 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/clear-custom-_session-variable-on-form-submit" rel="self" type="application/rss+xml" />

		<item>
			<title>urbanriver on "Clear custom $_session variable on form submit"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/clear-custom-_session-variable-on-form-submit#post-215350</link>
			<pubDate>Fri, 19 Apr 2013 05:04:40 +0000</pubDate>
			<dc:creator>urbanriver</dc:creator>
			<guid isPermaLink="false">215350@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Can anyone help me to clear some $_SESSION data when I submit a specific form.  I have tried using this hook (gform_after_submission) but can figure this out.&#60;/p&#62;
&#60;p&#62;EG code&#60;/p&#62;
&#60;p&#62;add_action(&#34;gform_after_submission&#34;, &#34;empty_session_data&#34;, 10, 2);&#60;br /&#62;
function empty_session_data($entry, $form){&#60;/p&#62;
&#60;p&#62;	//getting post&#60;br /&#62;
	if($entry[&#34;post_id&#34;] == 111) {&#60;br /&#62;
		unset($_SESSION['interested']);&#60;br /&#62;
	}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
