Note Submitter: Armando Scribano armando at scribano dot com dot ar
----
//PROTEC YOUR FILES . Double CHECK
User validation login
the basic operation
login.php
<?php
//f_login save a session with user and pass
$login = f_login($_REQUEST['usuario'],$_REQUEST['clave']);
//f_login return a encrypted value
if($login)
{
$_SESSION['login_enc']=$login;
}else{
//incorrect user or password.
}
?>
protected.php
<?php
//Protected page
//check
//1 CHECK. user and password
//return encrypted session
$enc_user = f_encuser($_SESSION['usuario'], $_SESSION['clave']);
//2 CHECK the last encrypted login and compare
if($_SESSION['login_enc']==$enc_user){
// correct
}else{
// incorrect
}
?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.