<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1032982" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1032982</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/webmasters-corner/php-redirects-sessions-and-etc-firefox#comment-1192893</link>
    <description> &lt;p&gt;Yes Busy is correct.  Here are some examples of what will and won&#039;t work:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Won&#039;t work 1:&lt;/strong&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt; session_destroy&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(); &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;/* Will be executed properly */ &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;head&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Location: mypage.php\&quot;);&amp;nbsp; /* This will cause an error since we already started displaying the page! */ &lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;Hello, this will never be seen and therefore is not needed.&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Won&#039;t work 2:&lt;/strong&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Location: mypage.php\&quot;);&amp;nbsp; // This will redirect the browser properly.&lt;br /&gt;session_destroy(); // This will never be executed!&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;Hello, this will never be seen and therefore is not needed.&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Will Work:&lt;/strong&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;session_destroy&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(); &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// This will be executed properly before the redirect.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Location: mypage.php\&quot;);&amp;nbsp; // This will redirect the browser properly.&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;Hello, this will never be seen and therefore is not needed.&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So all you just need in your page is:&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt; session_destroy&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;/* Any other php you want here as long as it doesn&#039;t output anything */&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Location: mypage.php\&quot;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I hope those example give you an idea of the correct order of things.&lt;/p&gt;
&lt;p&gt;-Jim&lt;/p&gt;
 </description>
     <pubDate>Wed, 08 Feb 2006 10:45:33 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1192893 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/webmasters-corner/php-redirects-sessions-and-etc-firefox#comment-1192889</link>
    <description> &lt;p&gt;You can use header redirect after logout, just has to be used before any output.&lt;br /&gt;
You can always destroy the session on the new page&lt;/p&gt;
 </description>
     <pubDate>Wed, 08 Feb 2006 08:51:46 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1192889 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/webmasters-corner/php-redirects-sessions-and-etc-firefox#comment-1192888</link>
    <description> &lt;p&gt;Hi dk01,&lt;/p&gt;
&lt;p&gt;Thanks for your suggestion! Unfortunately, I think this only solves the login problem (please correct me if I&#039;m mistaken). In my logout page, I do some database cleanup code and that must occur before the redirect. So I guess that the &lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Location: ...\&quot;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt; .. function won&#039;t help? Is there anything else I can do?&lt;/p&gt;
&lt;p&gt;A related question: Is meta refresh the only way to do redirects if there must be code before the redirect? Does anyone know of a better solution?&lt;/p&gt;
&lt;p&gt;Thanks again!&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;dk01 wrote:&lt;/strong&gt; One question I have is why are you using the meta refresh? Are you required to? If not I would strongly suggest you use PHP&#039;s header() function instead.  It works on the server before a page is served and therefore allows for you to forget about what browser the user is using.  Its proper use is:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;php header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Location: URLHERE\&quot;); &lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;You can only use this before any content has been sent to the browser otherwise you will get an error but it is a solid solution to your problem. Hope this helps some.&lt;/p&gt;
&lt;p&gt;-Jim&lt;/p&gt;&lt;/blockquote&gt;
 </description>
     <pubDate>Wed, 08 Feb 2006 08:02:39 +0000</pubDate>
 <dc:creator>triapply</dc:creator>
 <guid isPermaLink="false">comment 1192888 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/webmasters-corner/php-redirects-sessions-and-etc-firefox#comment-1192886</link>
    <description> &lt;p&gt;Woops thanks.&lt;/p&gt;
 </description>
     <pubDate>Wed, 08 Feb 2006 07:33:06 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1192886 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/webmasters-corner/php-redirects-sessions-and-etc-firefox#comment-1192881</link>
    <description> &lt;p&gt;Just a correction on the above PHP code&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt; header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Location: URLHERE\&quot;);&amp;nbsp; &lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 08 Feb 2006 06:49:59 +0000</pubDate>
 <dc:creator>Renegade</dc:creator>
 <guid isPermaLink="false">comment 1192881 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/webmasters-corner/php-redirects-sessions-and-etc-firefox#comment-1192876</link>
    <description> &lt;p&gt;One question I have is why are you using the meta refresh? Are you required to? If not I would strongly suggest you use PHP&#039;s header() function instead.  It works on the server before a page is served and therefore allows for you to forget about what browser the user is using.  Its proper use is:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;php header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Location: URLHERE\&quot;); &lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;You can only use this before any content has been sent to the browser otherwise you will get an error but it is a solid solution to your problem. Hope this helps some.&lt;/p&gt;
&lt;p&gt;-Jim&lt;/p&gt;
 </description>
     <pubDate>Wed, 08 Feb 2006 04:59:06 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1192876 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
