WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : user-authentication with php3 and msql
Categories : Authentication, mSQL, PHP, Databases Update Picture
Barry Grotjahn
Date : Sep 28th 1998
Grade : 2 of 5 (graded 2 times)
Viewed : 19483
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Barry Grotjahn
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

<?
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
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
Authorize Me! An authentication script.
Categories : MySQL, Databases, Authentication, PHP
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
Full membership authentication system.
Categories : Authentication, MySQL, PHP, Databases
Implementing a "Members ONLY" area
Categories : PHP, MySQL, Databases, Authentication
AUTH (.htaccess style) - a login system that uses PostgreSQL.
Categories : PHP, Authentication, Databases, PostgreSQL
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
Initializing the MSQL-tables via a 2-dimens array
Categories : mSQL, PHP, Databases
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
An SQL Administration User Interface for the Web
Categories : Databases, PHP, mSQL, Complete Programs
PHP4 AND MySQL Authentication
Categories : PHP, MySQL, Authentication, Databases
msql -- Send mSQL query
Categories : PHP, PHP Functions, mSQL, mSQL
databases administration remote Web
Categories : mSQL, PHP, Complete Programs, Databases
This is Yet Another Sql Abstraction Library. Include it in your script and you can use the most important SQL functions without worrying about the SQL backend.
Categories : Databases, PHP, ODBC, MySQL, PostgreSQL
 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 &lt;a&gt; 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