Javascript IE Redirection Loop (with some PHP)
<p>For some reason, the following causes a redirection loop in IE, but not in Chrome or Firefox.</p>

<pre><code>&lt;?php
if (isset($_POST['a']) OR strlen($_POST['a'])&gt;0)
    {
    die($_POST['a']);
    }
?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript" src="fpjs2.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form name="fbif" id="fbif" action="checkcookie.php" method="POST"&gt;
&lt;input type="hidden" name="a" value="" /&gt;
&lt;/form&gt;
&lt;script&gt;
var ec = new MyObject();
ec.get("fbuid", function(value) {
    document.fbif.a.value=value; 
    document.fbif.submit();
});
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>The script is called checkcookie.php and it checks for the existence of a cookie (that's not the issue, don't go on about that or try to advise me on how best to do it) then posts this back to the same script. The PHP at the top should detect if something has been posted or not, if so then only display the post variable and exit (don't load the rest of the script).</p>

<p>On Chrome and Firefox this works perfectly. On IE it redirects endlessly. So it seems that IE is not posting the variable but only reloading itself over and over.</p>
