And "hi" back, Yagna. Welcome to the Monastery.

But I'm confused. You say "I want the user to be logged into the main webpage."

Do you mean "logged into the default page (perhaps index.html -- ie, in some vernaculars, what's called the "landing"page) for the visitor initially arriving at your site, or do you mean that a successful login puts the user on a page whereon s/he can interact with the "two page application?"

My personal preference is to have the login script redirect to the ap if the uname/pw passes your tests... and, otherwise, to have it call a second CGI script which will throw up a new page which says 'That username doesn't match that password" or similar and provides a link (emphasis, LINK; NOT a redirect>) to the default (index.html or whatever).

I'm not going to bother to offer a detailed (and perhaps even rational) explanation of that preference; it's not something I've detailed -- in my own mind; let alone on paper -- to the degree needed to make it readable and defensible (which it may or may not be)   :( .


In reply to Re: Good way to redirect to a "members only" section of website by ww
in thread Good way to redirect to a "members only" section of website by yagna

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.