<?
if(!($PHP_AUTH_USER))
{
Header("WWW-authenticate: basic realm=\"restricted area\"");
Header( "HTTP/1.0 401 Unauthorized");
echo "failed\n";
?>
<meta http-equiv="refresh" content="0;url=failed.php3">
<?
exit;
}
else
{
msql_connect("localhost");
$user_id=strtolower($PHP_AUTH_USER);
$password=$PHP_AUTH_PW;
$Selstr="select * from user where
user='$user_id' and password='$password'";
$Result=msql("test",$Selstr);
if(!msql_num_rows($Result))
{
Header( "WWW-authenticate: basic realm=\"restricted area\"");
Header( "HTTP/1.0 401 Unauthorized");
exit;
}
?>
<meta http-equiv="refresh" content="0;url=welcome.php3">
<?
}
?>
Logs hits to any page which includes it. Automatically utilises page access information left behind by PHP/FI2.0. Categories : Databases , PHP , mSQL , Databases Is there some possibility to link a database to an htaccess file, so that instead of having a passwd file you would have a database with DES-crypted password and username fields? Categories : Authentication , PHP , General SQL , Databases Implementing a Members ONLY area Categories : PHP , MySQL , Databases , Authentication This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server. Categories : Databases , MySQL , Complete Programs , PHP , Databases AUTH (.htaccess style) - a login system that uses PostgreSQL. Categories : PHP , Authentication , Databases , PostgreSQL An SQL Administration User Interface for the Web Categories : Databases , PHP , mSQL , Complete Programs Initializing the MSQL-tables via a 2-dimens array Categories : mSQL , PHP , Databases msql -- Send mSQL query Categories : PHP , PHP Functions , mSQL , mSQL Returns the last row from a select where multiple rows have been selected.
In this case it is used to determine the last number in an AUTO_INCREMENT column. I use it to create "ticket numbers" or anything that needs a unique ID in sequence. Categories : mSQL , MySQL , Databases , PHP PHP4 AND MySQL Authentication Categories : PHP , MySQL , Authentication , Databases databases administration remote Web Categories : mSQL , PHP , Complete Programs , Databases Full membership authentication system. Categories : Authentication , MySQL , PHP , Databases Authorize Me! An authentication script. Categories : MySQL , Databases , Authentication , PHP complete, simple, working example of a login screen/system using php functions, cookies, and a mysql database for begginers. Categories : Authentication , Complete Programs , PHP , MySQL , Databases SQL / PHP based Integrated Authentication Categories : PHP , Authentication , Databases , MySQL
Richard Clark wrote : 146
I,m new to PHP3 Development. I,m trying to build a auth
script. The idea is to use basic checking script where
php3 checks mysql username and password fields, once
verified, the script using the <a> link finds the field with
the url for the page I want that company to access i.e
so if user - mike logs in he enters his username &
password the script checks for verifaction call up the url
mikespage.html and lets him link to his personal stuff...
all this info being in mysql