Print Page | Close Window

Login From Different Page

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=8011
Printed Date: 06 April 2026 at 9:13pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Login From Different Page
Posted By: cardsfan
Subject: Login From Different Page
Date Posted: 11 December 2003 at 1:44pm

I've just migrated everything over to the the newest version and everything works fine.  Now I want to allow my members to be able to login from my homepage (different directory than the forum), I'm sure I could just put a form with user id and password and pass that information to the login_user.asp file but I also want to be able to recognize if the user is already logged in so I can maybe put a welcome 'username' on the homepage.  I would also like to pull up the last 5 posted messages and who they we're posted by on the homepage

I thought this wouldn't be to difficult, the problem I run into is that my home page and other pages are not in the same directory as my forum.  Anyone know of an easy way to do this?




Replies:
Posted By: thekiwi
Date Posted: 11 December 2003 at 3:11pm
Originally posted by cardsfan cardsfan wrote:

I've just migrated everything over to the the newest version and everything works fine.  Now I want to allow my members to be able to login from my homepage (different directory than the forum), I'm sure I could just put a form with user id and password and pass that information to the login_user.asp file but I also want to be able to recognize if the user is already logged in so I can maybe put a welcome 'username' on the homepage.  I would also like to pull up the last 5 posted messages and who they we're posted by on the homepage

I thought this wouldn't be to difficult, the problem I run into is that my home page and other pages are not in the same directory as my forum.  Anyone know of an easy way to do this?

1.  In your own login page(s), once you have a successful login just set the cookie

Response.Cookies("WWF")("UID") = "myusername759R1B9394"

Note:

  1. WWF is the strCookieName, so change to yours
  2. UPdate the cookie if you want to set its expiry, eg Response.Cookies(strCookieName).Expires = DateAdd("yyyy", 1, Now())
  3. OPtional extras are Response.Cookies(strCookieName)("NS") = "0" if you want to set their "Not be Shown" in the Active User List (0=off,1=on)
  4. Set A session variable for Last Visit  - Session("dtmLastVisit") = CDate(Request.Cookies(strCookieName)("LTVST")) and then update the cookie for next visit with  Response.Cookies(strCookieName)("LTVST") = CDbl(Now())

Once you've done this, you will be automatically "logged in"

2.

For the last 5 POsted messages, you just need to query the database as per the WWF string and place that in your ASP home page

-------------
Cheers
TheKiwi
http://www.infobahn.co.nz - Internet Infobahn - website design and hosting


Posted By: cardsfan
Date Posted: 12 December 2003 at 7:01am

Thanks I'll give that a shot today, I'll let you know if it works.

Thanks again



Posted By: shadow man
Date Posted: 14 December 2003 at 2:22pm
i like the idea, but could you explain it in more detail?

-------------
http://www.shadow-portal.tk">


Posted By: thekiwi
Date Posted: 14 December 2003 at 2:25pm

Originally posted by shadow man shadow man wrote:

i like the idea, but could you explain it in more detail?

Which part?



-------------
Cheers
TheKiwi
http://www.infobahn.co.nz - Internet Infobahn - website design and hosting


Posted By: wistex
Date Posted: 14 December 2003 at 11:48pm

If you use my http://forums.webwiz.net/forum_posts.asp?TID=7929&PN=1 - Tutorial on Quick and Dirty SIte Integration , it may help.  My method would allow you to use almost any code that works in the forum directory on any other page of your website.

Note that this method is "quick and dirty."  There are much more efficient ways of doing this.  But if you are in a hurry and want something to build upon, then this is for you.

I have used it on http://www.caribbeanchoice.com - my site , and it allows me to have a universal login on every page among other things.



-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: shadow man
Date Posted: 15 December 2003 at 9:49am
i'll take a look

-------------
http://www.shadow-portal.tk">


Posted By: shadow man
Date Posted: 15 December 2003 at 10:16am
which cookie do you read to determine the lngLoggedInUserID?

-------------
http://www.shadow-portal.tk">



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net