User authentication (authenticate) and judge the information and database input by the user

xiaoxiao2021-03-06  85

Operating environment: Win2000 Server, Apache2, PHP4.3 installed in ISAPI module

IF (! isset ($ _ server ['php_auth_user'])) {

HEADER ('www-authenticate: Basic realm = "my realm");

HEADER ('http / 1.0 401 unauthorized');

// Error page

EXIT;

} else {

//Connect to the database

Echo "

hello {$ _server ['php_auth_user']}.

echo "

you entered {$ _server ['php_auth_pw']} as your password. ";

/ / Compare the information entered by the user to the data in the database

IF (! isvalidate) {

// Jump to the error page

}

}

?>

转载请注明原文地址:https://www.9cbs.com/read-122090.html

New Post(0)