in reply to Help required on cookie set and get

You have a login screen. Enter user id and password. After submit call .cgi script to validate your user id and password.
If they are correct then set cookie and redirect to "User Account page" by using
print "Location: http://www.somewebsite.com";
OR
$q->redirect('http://www.somewebsite.com');
Before display any authendication pages, check whether the cookie is exists or not. If not then redirect the page to login screen.
  • Comment on Re: Help required on cookie set and get

Replies are listed 'Best First'.
Re^2: Help required on cookie set and get
by Anonymous Monk on Jan 03, 2007 at 12:43 UTC
    siva kumar,
    Thanks a lot for your help.
    Still I am not clear, how the second time if the user call the home page, how it will point to User Account page?
    Step 1 : user type http://test.com/index.html
    step 2: enter userid and password and click on Submit button
    step 3: call cgi that checks whether cookie is present
    if not create cookie and call User Account Page
    else directly go to User Account page
    Close All pages

    Second time, if user type http://test.com/index.html
    will it point to User Account Page? Is it possible to do that?
    Thanks