Wednesday, 24 November 2010

Forms not submitting from an iframe (IE8, IE7)

So, we had a login system that was written in PHP.

The parent site got moved and so for reasons we can't remember, the site got a new URL. We then ended up putting the login system in an iframe...

... and the login stopped working in IE7 and IE8.

The solution is a simple header line at the top of the page inside the iframe:

<?PHP
header(‘P3P: CP=”CAO PSA OUR”‘);
?>

What this does is let IE retain the cookie/session information rather than start a new one each for each page.

No comments:

Post a Comment