Results 1 to 10 of 10

Thread: HTML - Password Gate [RESOLVED]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Location
    Scotland
    Posts
    123

    Resolved HTML - Password Gate [RESOLVED]

    I am needing to make a part of a website so that a username and password has to be entered into text boxes then a submit button is pressed which will check the usernames and passwords if correct then redirect to another url, if incorrect display a popup saying incorect password and reset the username and passwrod fields.

    I also need a reset button to reset both of the fields

    Thanks for helpin
    Last edited by Aaron Smith; Jul 27th, 2005 at 02:10 PM.
    Regards
    Aaron Smith

    Did my post help you, rate my post

    When Quoting VB Code use [vbcode][/vbcode]

    When your problem has been resolved change to *subject* [RESOLVED]

  2. #2
    Addicted Member
    Join Date
    Jul 2004
    Location
    Mumbai
    Posts
    236

    Re: HTML - Password Gate

    hi,

    do you want us to create a login page for you...
    i am adding a sample code, but you have to modify it to according to your webpage..
    you need basically two pages for this process(Note : you can also make it one). first is the page in which you'll enter the username and password.. Second page(asp) which will process the username and password and redirect you to appropriate page.

    this is asp part(processing page) "loginprocess.asp"

    Code:
    <%
    dim rs, admin, uid
    set rs = server.CreateObject("ADODB.Recordset")
    'con.open "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=FIPA"
    
    user=request.form("txtUsername")
    pass=request.form("txtPassword")
    rs.open "SELECT Id, Admin FROM Users WHERE LoginId='" & user & "' AND Password='" & pass & "'", con, 3, 2
    uid=""
    while not rs.eof
    	uid=rs("Id")
    	rs.movenext
    wend
    if rs.state = 1 then rs.close
    if(uid<>"")then 
    	'response.redirect("panel.asp")%>
    <script language="Javascript">location="Panel.asp";</script>
    <%else
    	'response.redirect("default.asp")%>
    	<script language="Javascript">location="default.asp";</script>
    <%end if%>
    this is form part(user & pass entering page..) "default.asp"
    Code:
    <html>
    ..
    <body>
    <form name="login" action="http://.../loginprocess.asp" method="post">
    <input type = "text" name="txtUsername">
    <input type = "password" name = "txtPassword">
    <input type = "submit" value="Login"> <input type="Reset" value="Clear">
    </form>
    </body>
    </html>
    --Kishore...

  3. #3
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: HTML - Password Gate

    u could also use php to process the username and password if u want

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Location
    Scotland
    Posts
    123

    Re: HTML - Password Gate

    thanks for replyin but the thing is i am not using php and as for .asp i dont know wot to do with the code

    my website is being built on ms front page and .html

    please help
    Regards
    Aaron Smith

    Did my post help you, rate my post

    When Quoting VB Code use [vbcode][/vbcode]

    When your problem has been resolved change to *subject* [RESOLVED]

  5. #5
    Fanatic Member
    Join Date
    Oct 2004
    Posts
    751

    Re: HTML - Password Gate

    Quote Originally Posted by Aaron Smith
    thanks for replyin but the thing is i am not using php and as for .asp i dont know wot to do with the code

    my website is being built on ms front page and .html

    please help
    Is your webserver Apache by any chance?
    My Projects: [ Instant Messagener Client/Server ] [ VBPictochat ]

    My Sites:
    [ Datanethost ]
    [ Helpdesk ]

    Remember if my post was helpful then Rate This Post.

  6. #6
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: HTML - Password Gate

    Aaraon your going to have to put some more thought into this.
    Questions that need to be answered
    1. What server are you using?
    2. Where/How are you storing the user/password information?
    3. How are you going to access that information?

    Once you have those details out of the way then you can start looking at how to put the login form together.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Location
    Scotland
    Posts
    123

    Re: HTML - Password Gate

    ok well i think this is right

    my host if that is wot u mean is www.123-reg.co.uk
    i want to store the username and password inside the html code ?
    access through a submit button
    Regards
    Aaron Smith

    Did my post help you, rate my post

    When Quoting VB Code use [vbcode][/vbcode]

    When your problem has been resolved change to *subject* [RESOLVED]

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Location
    Scotland
    Posts
    123

    Re: HTML - Password Gate

    its ok guys ive managed to find it on ma own
    Regards
    Aaron Smith

    Did my post help you, rate my post

    When Quoting VB Code use [vbcode][/vbcode]

    When your problem has been resolved change to *subject* [RESOLVED]

  9. #9
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: HTML - Password Gate [RESOLVED]

    What solution did you come up with?

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Location
    Scotland
    Posts
    123

    Re: HTML - Password Gate [RESOLVED]

    no sollution a friend helped me, dont have a clue how he done it but ive got it now, and can finally keep ma stuff secure
    Regards
    Aaron Smith

    Did my post help you, rate my post

    When Quoting VB Code use [vbcode][/vbcode]

    When your problem has been resolved change to *subject* [RESOLVED]

Posting Permissions

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



Click Here to Expand Forum to Full Width