pyr Posted September 8, 2007 Share Posted September 8, 2007 I have a script which use the following php code to login - code is before administration code: <?php include('config.php'); if(!isset($_SERVER['PHP_AUTH_USER']) or strcmp($_SERVER['PHP_AUTH_USER'],$login) or strcmp($_SERVER['PHP_AUTH_PW'],$password)) { header("WWW-Authenticate: Basic realm=Secured area"); header("HTTP/1.0 401 Unauthorized"); die("No entry. Goodbye!"); } else { // } ?> in cofig.php I have: $login = "admin";$password = "admin"; But when my provider changed php 4 to 5, i cannot login into administration anymore. Can you please check the code. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/68468-php-login/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.