Dave,

I see a couple of issue here. The first is the mixing of QueryString
and Form data.  Some web servers (like apache) do not allow you to mix
this in the same "submit." If the web server see's QueryString data,
then it will ignor the Form data is there is any. (Some web servers,
like IIS, will let you do both.) It's not a good practice to mix
QueryData and Form data, not to mention it is not that hard to fix. 
For example the following code that mixes them:
    <FORM ACTION="myPage.asp?ID=11234&User=BOB" METHOD="POST">
         ... some text and input fields ...
This can be changed to either all QUERYSTRING by changing the method to
GET:
    <FORM ACTION="myPage.asp?ID=11234&User=BOB" METHOD="GET">
         ... some text and input fields ...
Or can be changed all to FORM data by:
    <FORM ACTION="myPage.asp" METHOD="POST">
        <INPUT TYPE="HIDDEN" NAME="ID" VALUE="11234">
        <INPUT TYPE="HIDDEN" NAME="User" VALUE="BOB">
         ... some text and input fields ...
There are some size limitation with the GET method, so I would suggest
the POST method.

The other issue is the page caching.  This is a fustrating issue for
most programmers.  The browser tends to want to cache the page and
re-display it rather than have the server build a new page.  The
browser does check with the web server to see if the page has been
changed since the last display of it and if not, it displays the old
page.  After doing some research I found the HTML code you can add to
each page you don't want to cache and the browser will not cache it. In
the <HEAD> section, add the following code:
      <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
      <meta http-equiv="Expires" content="-1">
Plus, in-order to get IE not to cache the page, after the close body
tag, add another <head> section:
     </body>
     <Head>
         <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
     </head>
</html>
I realize that this looks strange to have another <Head> section after
the <body> section, but this is what it takes to make sure that
Microsoft's Internet Explorer does not cache the page (I got this from
Microsoft's web site). If you do not add the section <Head> section,
then IE will still try to cache the page. I have tested this code in
IE, Netscape, Mozilla, Opera and it has worked perfectly.

I hope this helps.

- Mike Chrisman


--- dave_apache_asp <[EMAIL PROTECTED]> wrote:
> I'm experiencing some weirdness:
> 
> My front page links to a login page for users that aren't currently 
> logged in.  The login page processes QueryString and Form data if 
> they exist.  The login form submits to itself and forwards to the 
> front page on a successful login.  It also forwards to the front page
> 
> if the user is already logged in.  The front page displays a logout 
> link for users who are already logged in.
> 
> Unfortunately, when the login link is followed and then the form 
> submitted, the form data appears to be discarded.  This does not 
> happen when the login page is navigated to directly by typing the 
> URL, only when a link is followed, suggesting it might be linked 
> somehow to HTTP_REFERRER.
> 
> If a user logs in successfully, then logs out, then follows the login
> 
> link from the front page again, the login page acts as if it just 
> received the previous (successful) form submission and logs the user 
> in without a new form submission, but the Form object should really 
> be empty at this point since this Request originates from a simple 
> hyperlink.
> 
> Here's the kicker:  I can make everything behave perfectly by simply 
> `touch`ing the login page immediately before submitting its form or 
> following the login link.  Something seems to be associating Requests
> 
> for files with their accompanying data and binding so tightly that 
> new Requests for the same files can't erase or replace the original 
> data.  Updating the files' timestamps forces proper behavior though.
> 
> I really like Apache::ASP, but this has been frustrating.  I could 
> probably get around it by using a login processor page, but that 
> seems clumsy.
> 
> I don't know whether the OS / etc. makes any difference, but it's 
> FreeBSD 4.6 / Apache 1.3.26 / mod_perl 1.2.7
> 
> thanks for any help.
> 
> -dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to