samedi 5 août 2017

Apache not reading "If" part of the code [duplicate]

This question already has an answer here:

This is probably not just me. My apache server isn't reading the "if" portion of my code. I have `

     <div id="toolbar">
         <? if(isset($_SESSION["steamname"]))
            {
                    <a class="button-logout" href="steamauth/logout.php">Log Out</a> 

                }
            else
                {
                    <a class="button-login" href="steamauth/login_steam.php">Log In</a>

                }
        ?>
    </div>` 

In my index.php but in google chrome I get

<!--?   if(isset($_SESSION["steamname"]))
            {
                    <a class="button-logout" href="steamauth/logout.php"-->

and the other bottom half gets read. I doubt that php is missing on my machine as the other php portions of my code works just fine.

Aucun commentaire:

Enregistrer un commentaire