Problem displaying if user is logged in

Hello,
I have a problem with this code.
[php]<?php
if(empty($_SESSION[‘user’]))
{
echo(“guest”);
}
else
{
echo htmlentities($_SESSION[‘user’][‘username’], ENT_QUOTES, ‘UTF’UTF-8’);
}
?>[/php]

Try this…

I think you just weren’t passing in the encoding properly.

[php] <?php
if(empty($_SESSION[‘user’]))
{
echo(“guest”);
}
else
{
echo htmlentities($_SESSION[‘user’][‘username’], ENT_QUOTES, “UTF-8”);
}
?>[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service