GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 24-Jul-2003, 15:13
rico rico is offline
New Member
 
Join Date: Jul 2003
Posts: 3
rico is an unknown quantity at this point

getting user


Hi,

i'm not certain if this is the forum in which to bring this up, but I thought i'd give it a try...

I'm using apache 1.3 as my server and have set up an admin directory that requires a username / pass. I'd like to get the username to use as a php variable in my scripts so that i can assign a post to a user. does anyone know how to access this "user" variable?
  #2  
Old 25-Jul-2003, 04:17
Garth Farley Garth Farley is offline
Awaiting Email Confirmation
 
Join Date: May 2002
Location: Ireland
Posts: 638
Garth Farley is a jewel in the roughGarth Farley is a jewel in the roughGarth Farley is a jewel in the rough
Yes indeed it it. I'm assuming by the Admin directory, that you've set up a .htaccess file with usernames & passwords in .htpasswd.

The username variable is contained in $_SERVER['PHP_AUTH_USER'] and the password in $_SERVER['PHP_AUTH_PW']

Simple as that
Ref: php.planetmirror.com

Garth Farley
 
 

Recent GIDBlogProgramming ebook direct download available by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
user rights permission problem zuzupus MySQL / PHP Forum 2 01-Sep-2003 04:19
im trying to make a user script dbztoolkit MySQL / PHP Forum 1 22-Aug-2003 17:13
Geo-targetting websites to create personalised information for the user jrobbio Advertising & Affiliates Forum 1 06-Jun-2003 09:11
wannabrowswer - http user agent spoofing jrobbio Web Design Forum 2 22-Mar-2003 08:11
Script needed for letting user input a few days of data for tracking and analysis. tradertt MySQL / PHP Forum 3 06-Mar-2003 03:54

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 23:34.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.