Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Adding a user name and password to a site

Options
  • 11-08-2002 2:55pm
    #1
    Closed Accounts Posts: 1,362 ✭✭✭


    Im having a nightmare trying to do this I want to have a member logon on a site that im building but I dont have a clue how to do it do I have to add a database and if so whats the best was of tackleing this.

    *.*Confused*.*


Comments

  • Registered Users Posts: 14,761 ✭✭✭✭Winters


    If there is only gonna be one user then you can use a simple ASP page to do it...

    If there are gonna be multiple users then you will need to create a database and have a login/logout page using the scriping language you are gonna use.

    Are you scripting in ASP? or php etc? if your scripting in ASP ill give you the code i use.


  • Closed Accounts Posts: 2,682 ✭✭✭chernobyl


    Link the login to a seperate database which contains the username and password and have a file "admin-security.asp" say, check the login details versus the one stored in the DB and then if the details match, redirect to a seperate script i.e. "vaild.asp" which will build the pages and links etc from the DB.

    Also to make it a little more secure, have an auto logout when there is no activity by creating another script like:
    <%
    RESPONSE.BUFFER = TRUE
    If Len(Session("pass"))=0 then Response.Redirect("secureDB.htm")
    %>

    ..and whatever this file is called, then "include" it in every page you want secured.

    <!-- #include file="data_security.asp" -->


    You could just use a Java based script, they are pretty secure now but if this is serious work then stay clear.
    Hope i have helped.


  • Registered Users Posts: 7,739 ✭✭✭mneylon


    Have a look on Hotscripts under the relevant scripting language you use/want to use

    There are quite a few snippets available using a variety of techniques varying from .htaccess through to full systems with database backend etc.,


  • Closed Accounts Posts: 2,486 ✭✭✭Redshift


    Do a Search for Htaccess it is quite secure and easy to set up and you can have as many users as you want.

    Cheers
    Redshift


  • Closed Accounts Posts: 25 CarrigHOST


    For one user use the .htaccess file if you are on linux other wise you will need a script

    Sean


  • Advertisement
  • Registered Users Posts: 7,739 ✭✭✭mneylon


    .htaccess supports multiple users, though you might want to make your life a little easier and use some kind of member management system.


  • Closed Accounts Posts: 25 CarrigHOST


    yep a script is always better for multiple users.

    Sean


Advertisement