![]() |
Welcome and Logout |
Post Reply ![]() |
Author | |
Jackalope ![]() Groupie ![]() Joined: 07-July-2006 Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() Posted: 20-June-2007 at 1:05pm |
I have just recently purchased PC and have begun creating a custom header. One item that I can't seem to figure out is how to impliment a session identifier that when a customer logs in, a line of text with "Welcome (customer name)" is shown somewhere in the header. I would also like to make a logout link appear when a customer is logged in and disappear when they are logged out. I'm no web expert, but I am fimiliar with Dreamweaver (which is what I'm using currently), so I have only a limited knowledge of .asp and html programming. I was trying to impliment some of the elements from CustPref.asp but I was only able to have the customer name appear and disappear based on their login. "Welcome" and "Logout" would remain even though I am no longer logged in as a customer. Thanks for you help in advance. I look forward to many years of working with PC and this great forum. It's a shame that it has taken me over 1.5 years to actually purchase PC. I should have done it sooner. Regards -Chris |
|
![]() |
|
Jackalope ![]() Groupie ![]() Joined: 07-July-2006 Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
Searching a bit more I found this post: http://www.earlyimpact.com/forum/forum_posts.asp?TID=17& KW=login+variable I will try some of what is described therein and post my results. Regards, -Chris |
|
![]() |
|
Jackalope ![]() Groupie ![]() Joined: 07-July-2006 Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
With a little trial and error, I figured it out. The code below displays either the current user (Guest or the customers name after they log in) with both "Login / Register" or "Your Account / Log Out" below the user. I created a class ".footernav" to tell how the text and links would display. These links as well as others in my footer share the same display properties.
<div class="footernav" id="myAccount"> <div align="right">Welcome <% ' Display Name of customer if logged in if session("idCustomer")="0" or session("idCustomer")="" then%> Guest!<br> <% else %> <strong><%=session("pcStrCustName") & "!"%><br> <a href="custPref.asp">Your Account</a> /</span> <a href="CustLO.asp">Log Out</a> <% end if %> <% ' If the customer is not an affiliate and is not logged in ' show a link to the registration page. if session("idCustomer")="0" or session("idCustomer")="" then%> <a href="custPref.asp">Login</a> /</span > <a href="custPref.asp">Register</a> <% end if %> </div> </div> Thanks to the forum members for previously helping out others with the same issue. Regards, -Chris |
|
![]() |
|
thegardenbath ![]() Newbie ![]() Joined: 11-June-2008 Location: South Carolina Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
I just wanted to say thank you! I've added this to my shop, which is still in development, and it's a really nice personal touch for the customer.
Thanks again! |
|
![]() |
|
macleather ![]() Newbie ![]() Joined: 23-June-2008 Location: Los Angeles Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Hi Jackalope,
I was wondering where you inserted the code described above? Was it header.asp? Thanks, Alan |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |