Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cookie to check if logged in


luxor

Recommended Posts

Posted

I have a log in link on top of site. I would like this log in text to change to log out if a person is logged in.

 

 

Anyone know how to check to see if someone is logged in?

 

many thanks happy turkey day!

Posted

<?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a> <?php } else { ?><a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a><?php } ?>

 

That would give the user a text Log In or Log Off link, depending on their status.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...