Hi all,

I have an image+href sitting in a sidebox. I want the image+href to be set a certain way if the user is currently logged in, and another way if the user is not currently logged in.

I found some code from other similar forum posts and have adapted my code as below.

Code:
if($_GET['id'] == xx and !$_SESSION['customer_id']) {
$content = "<div style=\"   width:161px; background-color:#FFFFFF; padding:5px; border:2px solid #C7A88B; margin-top:8px;     \"><a href=\"http://mywebsite.com.au/shop/index.php?main_page=login\"><img src=\"images/squirrel02/squirrel-login.jpg\"></a></div>                 ";
} else {
$content = "<div style=\"   width:161px; background-color:#FFFFFF; padding:5px; border:2px solid #C7A88B; margin-top:8px;     \"><a href=\"http://mywebsite.com.au/shop/index.php?main_page=logoff\"><img src=\"images/squirrel02/squirrel-logout.jpg\"></a></div>                 ";
}
The problem with this method is, it always defaults to the second option. Can somebody show me what I'm doing wrong?

Many thanks,

Standbridge