PHP User authentification
user authentification
Copy this code and paste it in your HTML
<?php
if (!isset($_SERVER['PHP_AUTH_USER']) || !($_SERVER['PHP_AUTH_USER'] == 'xxx' && $_SERVER['PHP_AUTH_PW'] == 'xxx')) { header('WWW-Authenticate: Basic realm="DBU Manager"'); header('HTTP/1.0 401 Unauthorized'); echo 'Access denied';
}
?>
Report this snippet
Comments
Subscribe to comments