![]() |
|
#1
|
|||
|
|||
getting userHi,
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
|
|||
|
|||
|
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 GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
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