Simple one person password portected page

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Simple one person password portected page

    I am clueless... I have built a web site but I want the home page to be
    password protected, but I only want one person to have access to it. I will
    give them the user name and password. I don't want to create a registration
    page, but all the tutorials I have seen say I must make one. I just want one
    person to have the password and user name. How do I do this??

    Anron Guest

  2. Similar Questions and Discussions

    1. How to do a person to person webcam chat without FCS?
      Hi, Is it not possible to do streaming audio or audio/video between two Flash clients without going through FCS? Or, are there alternatives to FCS?...
    2. How can I tell when other person modifies a page?
      I use Dreamweaver, and I recently set my boss up with Contribute so he can make simple changes when he needs to. My question is how do I know when...
    3. How to password protect a page?
      I have a set of bulletins in a new site that the client wants protected. He wants the visitor to enter a password to access the bulletin index page...
    4. Automatically insert last person/time to edit page
      We're encouraging our users to (at present manually) update the footer of the page with their email address and the date they last updated a page. ...
    5. Warning Page Has Expired, I need to turn it OFF for a simple search page
      You can't turn it off. If you understand the reason for it, then you know that the Back button or Refresh button of a browser makes a new request...
  3. #2

    Default Re: Simple one person password portected page

    Anron

    Create a login page with the form action set back to the login page.
    Then place the following code at the top of the login page, with UserName
    and Password the names of the text boxes in the login form.

    <%
    If Len(Request("UserName")) > 0 Then

    Dim CorrectUserName, CorrectPassword
    CorrectUserName = "TestName"
    CorrectPassword = "TestPass"

    If Trim(Request("UserName")) = CorrectUserName And Trim(Request("Password"))
    = CorrectPassword Then
    Session("CorrectUser") = CorrectUserName
    Response.Redirect("Homepage.asp")
    End If

    End If
    %>

    Then on the homepage put the following code at the top:

    <%
    If Session("CorrectUser") <> "TestName" Then
    Response.Redirect("LoginPage.asp")
    End If
    %>

    Hope this helps (and works) as I havent tried it out or tested it.

    Brendan


    "Anron" <webforumsuser@macromedia.com> wrote in message
    news:dclsta$633$1@forums.macromedia.com...
    > I am clueless... I have built a web site but I want the home page to be
    > password protected, but I only want one person to have access to it. I
    will
    > give them the user name and password. I don't want to create a
    registration
    > page, but all the tutorials I have seen say I must make one. I just want
    one
    > person to have the password and user name. How do I do this??
    >

    Singularity.co.uk Guest

  4. #3

    Default Re: Simple one person password protected page

    The only thing I don't understand is the part when you said " with UserName
    and Password the names of the text boxes in the login form."
    I haven't ever messed with the forms in dreamweaver b4 so I am a huge newbe
    when it comes to forms.

    Anron Guest

  5. #4

    Default Re: Simple one person password protected page

    On page use something like:

    <form name="frmLogin" id="frmLogin" action="LoginPage.asp" method="post">
    <table align="center">
    <tr>
    <td>UserName</td>
    <td><input name="UserName" type="text"></td>
    </tr>
    <tr>
    <td>Password</td>
    <td><input name="Password" type="text"></td>
    </tr>
    <tr>
    <td></td>
    <td><input name="btnSubmit" type="submit" id="btnSubmit"
    value="Login"></td>
    </tr>
    </table
    </form>

    Again, this might not be 100% correct as I have just done it off the top of
    my head.


    "Anron" <webforumsuser@macromedia.com> wrote in message
    news:dco2af$bfc$1@forums.macromedia.com...
    > The only thing I don't understand is the part when you said " with
    UserName
    > and Password the names of the text boxes in the login form."
    > I haven't ever messed with the forms in dreamweaver b4 so I am a huge
    newbe
    > when it comes to forms.
    >

    Singularity.co.uk Guest

  6. #5

    Default Re: Simple one person password protected page

    ok thanks I will give it a try tonight when I get home. I will let you know how it goes.
    Anron Guest

  7. #6

    Default Re: Simple one person password protected page

    ok I have a really big Newbie question. Where do I insert the asp script.
    Could you please tell me how and where to insert the script. I know I can copy
    and paste but I don't know where to copy and paste too. Is there a specific
    location I have to paste it in? And I save it as an .asp right? Or do I create
    a new dynamic page under the file new menu?

    Anron Guest

  8. #7

    Default Re: Simple one person password protected page

    Ok I don't think the code you gave me worked cuz I found this code in the
    dreamweaver help <p>This page was created at <b>
    <%= Time %>
    </b> on the computer running ASP.</p>


    and it worked just fine.
    When I try the code you posted, the page won't display I get the http page
    won't display page.

    Anron Guest

  9. #8

    Default Re: Simple one person password protected page

    Anron

    Try looking at one of the following tutorials:

    [url]http://www.macromedia.com/support/ultradev/building/login_page/[/url]
    [url]http://www.webthang.co.uk/tuts/tuts_dmx/dmxf_4/dmx4_1.asp[/url]

    Brendan

    "Anron" <webforumsuser@macromedia.com> wrote in message
    news:dcv0f6$d9b$1@forums.macromedia.com...
    > Ok I don't think the code you gave me worked cuz I found this code in the
    > dreamweaver help <p>This page was created at <b>
    > <%= Time %>
    > </b> on the computer running ASP.</p>
    >
    >
    > and it worked just fine.
    > When I try the code you posted, the page won't display I get the http
    page
    > won't display page.
    >

    Singularity.co.uk Guest

  10. #9

    Default Re: Simple one person password protected page

    I read the links that you posted. They talk about creating a registration page
    and a database. I just want to create a simple one user and one password login
    system. I haven't been able to find anything that simple yet.

    Anron Guest

  11. #10

    Default Re: Simple one person password portected page

    Anron

    Have you an email address where I can send you two files demonstrating what
    you need?

    If so, when you are posting it, use something like below to stop your email
    address being grabbed by email bots:

    AnronATmysiteDOTCOM

    Brendan

    "Anron" <webforumsuser@macromedia.com> wrote in message
    news:dclsta$633$1@forums.macromedia.com...
    > I am clueless... I have built a web site but I want the home page to be
    > password protected, but I only want one person to have access to it. I
    will
    > give them the user name and password. I don't want to create a
    registration
    > page, but all the tutorials I have seen say I must make one. I just want
    one
    > person to have the password and user name. How do I do this??
    >

    Singularity.co.uk Guest

  12. #11

    Default Re: Simple one person password portected page

    Cool thanks, anron_EATtyahooDotCom lol strange never looked at my email that way b4 looks kinda funny apparently I like to eat Dotcoms lol.
    Anron Guest

  13. #12

    Default Re: Simple one person password portected page

    Is there supposed to be a letter t between EAT and yahoo???


    "Anron" <webforumsuser@macromedia.com> wrote in message
    news:dd7rnk$o1n$1@forums.macromedia.com...
    > Cool thanks, anron_EATtyahooDotCom lol strange never looked at my
    email that way b4 looks kinda funny apparently I like to eat Dotcoms lol.


    Singularity.co.uk Guest

  14. #13

    Default Re: Simple one person password portected page

    I got it. I will test it next monday, I am gone to pittsburg to visit family so I will let you know on monday how things turn out. Thanks again.
    Aaron
    Anron 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