<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1060181" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1060181</link>
    <description></description>
    <language>en</language>
          <item>
    <title>First things first.... Do NOT</title>
    <link>https://www.webmaster-forums.net/web-database-development/using-session-what-went-wrong#comment-1288900</link>
    <description> &lt;p&gt;First things first.... Do NOT use @ on a line unless you have a good reason. If you are using that, it usually means that you are not using good coding practices. In your code, you are using it to hide the warning that $_POST[&#039;email&#039;] is set. This is just a big no-no in terms of good programming.&lt;/p&gt;
&lt;p&gt;For this, instead you should actually be checking if it exists:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$_SESSION[&amp;#039;session_var2&amp;#039;] = (isset($_POST[&amp;#039;email&amp;#039;])) ? $_POST[&amp;#039;email&amp;#039;] : FALSE;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Now onto the main issue you are having: You are having the form submit to sessionTest2.php, that is the script that will see $_POST[&#039;email&#039;]. There first one would only see it if you were coming from another page that had a form and it was set to post to it.&lt;/p&gt;
&lt;p&gt;So move your session setting code for e-mail down to the second script, and it should set the session properly for you and then be available anywhere else the session is alive.&lt;/p&gt;
 </description>
     <pubDate>Sun, 14 Sep 2014 09:38:05 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1288900 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
