For some reason, the following causes a redirection loop in IE, but not in Chrome or Firefox.
<?php
if (isset($_POST['a']) OR strlen($_POST['a'])>0)
{
die($_POST['a']);
}
?>
<html>
<head>
<script type="text/javascript" src="fpjs2.js"></script>
</head>
<body>
<form name="fbif" id="fbif" action="checkcookie.php" method="POST">
<input type="hidden" name="a" value="" />
</form>
<script>
var ec = new MyObject();
ec.get("fbuid", function(value) {
document.fbif.a.value=value;
document.fbif.submit();
});
</script>
</body>
</html>
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).
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.
In my opinion you were right that on IE it doesn’t post “a” variable, but it should make post of the form. So I bet the issue is on your javascript and compatibility with IE.
I would try to not posting the form, but trying to check if it returns value you think it should return, mby with
alert(value);or just commenting submit function and checking if input got the value.EDIT:
isset($_POST['a']) OR strlen($_POST['a'])>0=>isset($_POST['a'])totally same effect as if strlen($_POST[‘a’])>0 would be true, then isset($_POST[‘a’]) also would be true.