1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Rep Power
    Ok, I am using a simple .htaccess file
    to test login/password in a mySQL Database.

    My question is, how do I pass the login name
    off to a php3 document so that I can customize content for the user. I am not interested in doing sessions or anything like that at this time, I just want to get the user logged in, and customize some basic content for him/her.

    here is my .htaccess:

    Auth_MYSQL on
    Auth_MySQL_DB devshedrocks
    Auth_MySQL_Password_Table test
    Auth_MySQL_Username_Field login
    Auth_MySQL_Password_Field pw
    Auth_MySQL_Empty_Passwords off
    Auth_MySQL_Encryption_Types MySQL
    Auth_MySQL_Authoritative On

    AuthName "Hi Devshed users.. you rock"
    AuthType Basic
    require valid-user

    I want to be able to recognize the user
    in the index.php that immediately follows
    this .htaccess. I tried using $REMOTE_USER
    or something like that.. I read about it
    somewhere else.. but it didnt quite work.

    Any help would be appreciated!!!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Rep Power
    That is exaclty why you would want to use sessions. I have never done what you are trying to do with .htaccess and passing info to PHP, but you might try sessions. With PHP 4.0 they weren't that hard to learn. Might be easier than you think.

Similar Threads

  1. mod_auth_mysql & php login check ?
    By yhcmarc in forum PHP Development
    Replies: 1
    Last Post: February 16th, 2004, 01:25 AM
  2. Replies: 8
    Last Post: February 6th, 2004, 02:41 PM
  3. PHP .htaccess -please do not move need PHP info
    By DatNigz2002 in forum PHP Development
    Replies: 1
    Last Post: February 4th, 2004, 02:26 PM
  4. .htaccess + mod_auth_mysql + php + custom login page
    By Seather in forum PHP Development
    Replies: 0
    Last Post: February 2nd, 2004, 09:15 PM
  5. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 03:12 PM

IMN logo majestic logo threadwatch logo seochat tools logo