thinkmarsh Posted May 6, 2007 Share Posted May 6, 2007 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 More sharing options...
jasonabc Posted May 6, 2007 Share Posted May 6, 2007 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. Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix Link to comment Share on other sites More sharing options...
thinkmarsh Posted May 6, 2007 Author Share Posted May 6, 2007 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 More sharing options...
jasonabc Posted May 6, 2007 Share Posted May 6, 2007 as I said - it's in /includes/header.php. If you don't have it in your file - then download a fresh version of OSC and grab it from there. Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix Link to comment Share on other sites More sharing options...
luddite_jean Posted May 7, 2007 Share Posted May 7, 2007 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 More sharing options...
luddite_jean Posted May 7, 2007 Share Posted May 7, 2007 Found the perfect answer to my requirements - a contribution at http://www.oscommerce.com/community/contributions,2058 - Login box V5.4 Thanks to whoever wrote that, it's perfect! -Jean. Link to comment Share on other sites More sharing options...
thinkmarsh Posted May 8, 2007 Author Share Posted May 8, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.