|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi all,
i'd like to protect a page with a user name and password using php3. can anyone give me a push in the right direction please? thankee |
|
#2
|
|||
|
|||
|
this shold do it
<?php if(!isset($PHP_AUTH_USER)) { Header("WWW-Authenticate: Basic realm="My Realm""); Header("HTTP/1.0 401 Unauthorized"); echo "Text to send if user hits Cancel buttonn"; exit; } else { echo "Hello $PHP_AUTH_USER.<P>"; echo "You entered $PHP_AUTH_PW as your password.<P>"; } ?> Just fill out the missing parts.. ------------------ regds.. -ulrik- |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > password protect in php3 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|