asp page with logout issues

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default asp page with logout issues

    Hi
    I am having a problem with my asp application. here is very simple
    description. I created a user login.asp,
    that user login with his username and password, once he in, he can
    fill out several application forms...so on.
    at the last, if user click logut, it will leave that applicaiton and
    redirect to the main URL. So far, I don't
    have problmes except with the logout page. B/s when I click logout and
    it brings me to the main website. However,if
    I click the back button from the browser, it still brings me back the
    asp application. is there anyway that once
    you logout, and you cann't going back to your asp application.
    Below is my simple code, thanks in advance.
    '--------------------------------------------------------------
    td><form method="post" action="applicationshell.asp" onsubmit="return
    validateForm(this)" id=form1 name=form1>
    <table width="100%" border="0"
    cellspacing="0" cellpadding="0">
    <tr>
    <td colspan="2"><font size="2"
    face="Tahoma"><strong>Enter
    your username and password in
    the boxes
    below:</strong></font></td>
    </tr>
    <tr>
    <td width="18%"><font size="2"
    face="Tahoma">Username:</font></td>
    <td width="82%"><font size="2"
    face="Tahoma">
    <input name="username"
    type="text" maxlength="50">
    </font></td>
    </tr>
    <tr>
    <td><font size="2"
    face="Tahoma">Password:</font></td>
    <td><font size="2" face="Tahoma">
    <input name="password"
    type="password" maxlength="9">
    </font></td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td><font size="2" face="Tahoma">
    <input type="submit"
    name="Submit" value="Login">
    <input type="reset"
    name="Submit2" value="Reset">
    </font></td>
    </tr>
    </table>
    </form></td>
    '-----------------------------------------------------------------------
    <%
    strusername = request.form("username")
    strpassword = request.form("password")
    %>

    <!--#include file="includes/connection.inc"-->

    <%
    strquery = "SELECT username, password "& _
    "FROM Identi " & _
    "WHERE username= '" & strusername & "' and password= '" &
    strpassword & "'"%>

    <%Set rsname = ConnCW.Execute(strquery)%>
    <%
    If rsname.eof Then
    response.redirect("xxx.xxx.com")
    else

    End If
    %>
    td><form name="applicationupdateform" method="post"
    action="thankyou.asp">
    <tr>
    <td height="13"><font size="1" face="Tahoma">Positions
    Apply Informations</font></td>
    <td><font color="#FF0000" size="1"
    face="Tahoma">Completed</font><font size="1" face="Tahoma">
    - Please <a href ="positioninfoupdate.asp?id=<%=strpassword%>"
    target="_blank" style="color:#0000ff">click
    </a>to update your information</font></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><input type="submit"
    name="Submit" value="Exit">
    '---------------------------------------------------------------
    <tr>
    <td><div align="left"><font size="2"
    face="Tahoma">
    Successful logout. <a
    href="http://www.slps.org" style="color:#000000">Click</a>
    to return to main
    page</font></div></td>
    </tr>
    weiwei Guest

  2. Similar Questions and Discussions

    1. logout(without getting page using back button)
      hi i would like to implement a logout page which is very secure so that after logging out a user cannot use the back button for accessing the...
    2. Viewing COMDLG32 from an ASP page issues
      We have an ASP page that generates a report. We have included a button on the page that allows the user to save the report as a .csv file. The...
    3. [PHP] Front Page User Logout
      How can I provide a link which will log the current user out so that they will be prompted again to login. I'm using frontpage authentication on...
    4. Front Page User Logout
      How can I provide a link which will log the current user out so that they will be prompted again to login. I'm using frontpage authentication on an...
    5. after logout, how to retrieve an expired page if user click 'back' button?
      hi everyone, i've made a login and logout page, after user have logout, i want to retrieve an expired page if user click the 'back' button to...
  3. #2

    Default Re: asp page with logout issues

    Disallow page caching on your session-protected pages. (I'm assuming you're
    using sessions to determine if the user is logged in, but that's beside the
    point.)

    [url]http://www.aspfaq.com/show.asp?id=2022[/url]

    Ray at work


    "weiwei" <Wei.Huang@slps.org> wrote in message
    news:d32b0478.0402251311.7724ce13@posting.google.c om...
    > Hi
    > I am having a problem with my asp application. here is very simple
    > description. I created a user login.asp,
    > that user login with his username and password, once he in, he can
    > fill out several application forms...so on.
    > at the last, if user click logut, it will leave that applicaiton and
    > redirect to the main URL. So far, I don't
    > have problmes except with the logout page. B/s when I click logout and
    > it brings me to the main website. However,if
    > I click the back button from the browser, it still brings me back the
    > asp application. is there anyway that once
    > you logout, and you cann't going back to your asp application.
    > Below is my simple code, thanks in advance.

    Ray at Guest

  4. #3

    Default Re: asp page with logout issues

    That's just the nature of the Back button.

    But if interested you can check this out.

    A1ien51's disable the Back Button
    [url]http://www10.brinkster.com/A1ien51/Scripts/BackButton.htm[/url]
    What is going to happen, is when the page loads, it will send the surfer
    to the last page in their history.
    Now if a person tries to go back to it, then it will send them directly
    back to the page they pushed the back button on!
    Add this code to the header of your page:
    <script>
    history.forward();
    </script>

    JPS: Thus need to put the code on the page you don't want the user to be
    able to go back to.
    And here is my version of it:
    <script type="text/javascript"> <!--
    // Disable browser's Back button on another pg being able to go back to
    this pg.
    history.forward();
    //-->
    </script>

    But if the page you put this on uses alert boxes for validation, may see
    that again.

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Developer
    [url]http://www.Bullschmidt.com[/url]
    ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bullschmidt Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139