PHP code not working on IE

Posted by Michael Frey on Stack Overflow See other posts from Stack Overflow or by Michael Frey
Published on 2010-04-08T10:44:31Z Indexed on 2010/04/08 10:53 UTC
Read the original article Hit count: 279

Filed under:
|
|
|

I have a website with a flag. If it is clicked, the language of the website changes.

Here is the code displaying the flag, which is a form with post event:

   <?php 
    $pagename = $_SERVER['REQUEST_URI'];
    echo '<form action="'.$pagename.'" method="post">
    <input name="formlanguage" type="image" ';
    if ($_SESSION['lang'] == 0)
    {
        echo 'alt="English" src="images/en.png" value="1" ';
    }
    else
    {
        echo 'alt="Deutsch" src="images/de.png" value="0" ';
    }
    echo '/></form>';
    ?>  

Here is the response to that, and this part always fails on IE:

if (isset($_POST['formlanguage']))
{
    $_SESSION['lang']=$_POST['formlanguage'];
}

I can not figure out why it works on Chrome but not IE. I assume that it might be a setting of IE. But what could that be?

© Stack Overflow or respective owner

Related posts about php

Related posts about ie