Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

login logoff script


thinkmarsh

Recommended Posts

Hi all,

 

I want to create a link to logoff to the logoff.php page and a link to the login page. But I want the link to change depending on your status for example if you're not logged in it says login, and if you are logged in it says logout and goes to the appropriate page.

But how do i do it?

 

Thanks

Link to comment
Share on other sites

Just add an "else" clause to the "if" statement in /includes/header.php that shows the "logoff" link if a customer is logged in. The else would be to display a "log in" link.

 

 

what would that script be? Because I don't have the login link on my header file....its customised! :huh:

Link to comment
Share on other sites

I have the same problem - I have a customised header.php, with part of the breadcrumb removed (the login/logoff and cart bits). When I try to add it back in from a unsullied header.php, I get a page full of errors - the first is unexpected '?'. I looked at the code, and can't see anything spurious, but I'm not an expert php coder!

 

Anyone know of a bit of code I can put in an infobox? That's what I did with the shopping cart script.

 

Thanks in advance,

-Jean.

Link to comment
Share on other sites

Hey.

I've tried to get it all working but I can't, this is what I have in my header.php

 

<tr><td><img src=images/m10.gif width=9 height=7 align=absmiddle>  <a href=<?=tep_href_link('login.php')?> class=ch3>Customer Login</a></td></tr>

 

I want an extra line or whatever so that when you are logged in it says Customer Logout, do I use an if or else statement? What line should it say? I'm stumped!!

 

Thanks! :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...