Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Adding a user name and password to a site

  • 11-08-2002 02: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, Registered Users 2 Posts: 14,762 ✭✭✭✭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, Registered Users 2 Posts: 7,742 ✭✭✭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, Registered Users 2 Posts: 7,742 ✭✭✭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