Hi guys,
Quick question, I want to run a site with HTTP Authorization however I want users to use thier username and passwords which are stored in mysql db....
How would I do this...
many thanks in advance....
code shows how to do it without MYSQL....
<?php
$auth = 0;
if (($PHP_AUTH_USER == "foo" ) && ($PHP_AUTH_PW == "bar" )) $auth = 1;
if ( $auth != 1 ) {
header( "WWW-Authenticate: Basic realm="Authorization Required!"" );
header( "HTTP/1.0 401 Unauthorized" );
echo 'Authorization Required!';
exit;
}