Hi all, I need show an image depending on yes or not, but the problem after it show on doesn't go way and both keep in the screen.
i need to hide one of then.
this is my code:
if($_SESSION['userstate']='yes')
{
/echo "<img src='images/login.gif'>";
}
if($_SESSION['cback']='no')
{
// echo "<img src='images/logoff.gif'>";
}
thanks in advance.
Show or Hide Image on Yes or Not?
Moderator: General Moderators
Re: Show or Hide Image on Yes or Not?
It sounds like you want to toggle the display of the image without refreshing the page. That would require javascript or ajax. The only way to clear the image off of the page using PHP would be to update the session variable then do a refresh.