Password only - no username
Results 1 to 2 of 2

Thread: Password only - no username

  1. #1
    Senior Member
    Join Date
    Jun 2000
    Posts
    65,357

    Password only - no username

    Help,
    I need to create a login page that only uses a password to gain access to a folder (no login or username)

    Can anyone send me info on how to do this?
    Or does anyone know of a pre-existing script?

    Any help would be appreciated. I thought I had it figured out a few times, but something always went wrong (re-directs and stuff). The site is hosted on a Cobalt RaQ4 server (apache)

    Thanks in advance
    Maxine


  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    65,357

    RE: Password only - no username

    you could use apache to auth the users. in your apache password file (mine is /home/httpd/.htpasswd) just have ":encrypted_password" and in .htaccess file in the folder to be protected:

    ##############################
    AuthName "Protected"
    AuthType Basic
    AuthUserFile /home/httpd/.htpasswd

    require valid-user
    ##############################

    apache will prompt for username/password on accessing the folder or any file inside it, user leaves username blank and types in the password to connect.

    if you rely on php to auth users one of the issues is that you need to protect each and every file in the folder (add a generic header to each script and check sessions to be sure the user is logged in). or you can place your content into a database (mysql perferred =) ) and have a php script to verify password and pull the correct file from the database.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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