Multiple User login in ASP

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Multiple User login in ASP

    Hi I have set up a site that contains a login area. It works fine and I can
    add multiple users. The problem I have got is that each user will be sent to
    the same page (client.asp), how can I change it so that each user is sent to
    their own page. I have attached the code I'm using. Any help would be much
    appreciated!

    <%
    Set conn = server.createobject("adodb.connection")
    DSNtemp = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    Server.Mappath("../../private/login.mdb")
    conn.Open DSNtemp

    If InStr(Request.Form("uid"),"'") Then
    uid = Replace(Request.Form("uid"),"'"," ")
    Else
    uid = Request.Form("uid")
    End If
    If InStr(Request.Form("pwd"),"'") Then
    pwd = Replace(Request.Form("pwd"),"'"," ")
    Else
    pwd = Request.Form("pwd")
    End If

    SQL = "Select * From users Where uid = '" & uid & "' And pwd = '" & pwd & "'"
    Set RS = Conn.Execute(SQL)

    If Not RS.EOF Then
    Session("okeydokey") = True

    Set RS = Nothing
    Conn.Close

    Response.Redirect "client.asp"
    Else

    Set RS = Nothing
    Conn.Close
    Response.Redirect "login.asp"

    End If
    %>

    mr merky Guest

  2. Similar Questions and Discussions

    1. Login User from Novell Login
      Hi, At present a user loggin onto our netwok enters their username and password by a Novell Login prompt. When they fire up their browser they...
    2. user and admin login on same login page
      Hello, I have a user login page which also doubles as my administrator login. Currently, my method of logging in doesnt seem to be working...
    3. Multiple User Login on different PC's
      Hi all, Ive recently implemented a fully working login functionality on a project im working on, however, im struggling to come up with the code...
    4. Domain Login - One User Can/Another User Cannot from same Win XP computer
      Okay ... I'm confused. I installed a brand new computer and everything was working fine. I was then advised who would be getting the computer,...
    5. User changing something on a form makes asp.net take user to login page
      Hi, I have an application that displays the database table records on the web page, the user can navigate thru the contents and make changes and...
  3. #2

    Default Re: Multiple User login in ASP

    If by their own page you are meaning that their own details will be shown,
    then simply change client.asp so that it filters based on the passed session
    variable and only displays that information.

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "mr merky" <webforumsuser@macromedia.com> wrote in message
    news:d2otvl$fkq$1@forums.macromedia.com...
    > Hi I have set up a site that contains a login area. It works fine and I
    can
    > add multiple users. The problem I have got is that each user will be
    sent to
    > the same page (client.asp), how can I change it so that each user is sent
    to
    > their own page. I have attached the code I'm using. Any help would be
    much
    > appreciated!
    >
    > <%
    > Set conn = server.createobject("adodb.connection")
    > DSNtemp = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    > Server.Mappath("../../private/login.mdb")
    > conn.Open DSNtemp
    >
    > If InStr(Request.Form("uid"),"'") Then
    > uid = Replace(Request.Form("uid"),"'"," ")
    > Else
    > uid = Request.Form("uid")
    > End If
    > If InStr(Request.Form("pwd"),"'") Then
    > pwd = Replace(Request.Form("pwd"),"'"," ")
    > Else
    > pwd = Request.Form("pwd")
    > End If
    >
    > SQL = "Select * From users Where uid = '" & uid & "' And pwd = '" & pwd &
    "'"
    > Set RS = Conn.Execute(SQL)
    >
    > If Not RS.EOF Then
    > Session("okeydokey") = True
    >
    > Set RS = Nothing
    > Conn.Close
    >
    > Response.Redirect "client.asp"
    > Else
    >
    > Set RS = Nothing
    > Conn.Close
    > Response.Redirect "login.asp"
    >
    > End If
    > %>
    >

    Paul Whitham TMM 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