Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

login and log off links


john77

Recommended Posts

Posted

you know how after you log in it shows a logoff link in the header well i am looking to have it to where when your logged off it would say log in and after you log in it changes to log off anybody know how i can do this

Posted

<?php

if (!tep_session_is_registered('customer_id')) { //if user is not logged in

?>

HTML CODE FOR LOGIN HERE

<?php

}

if (tep_session_is_registered('customer_id')) { // if user is logged in

?>

HTML CODE FOR LOGOFF HERE

<?php

}

?>

 

I'm no php expert, but it works for my site in some places where I show or don't show something based on login status.

 

Hope it helps.

 

Charlie

  • 3 weeks later...
Posted

i want to have a section at the top of my site that says, "Welcome Customer, LOG-IN" or if they are already logged in, then "Welcome Customer LOG-OUT"

 

(perhaps the custopmers name too??"

 

i dont understand how to implement this as it is written in the above post.... can someone help me understand?

 

I figure i just copy this in my site somewhere in a cell or something, but when i do i get errors, what would go in teh place that says " HTML CODE FOR LOGIN HERE" ??

 

any help would be very appreciated... thank you

Archived

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

×
×
  • Create New...