mira este es el codigo que tengo para el login
Código PHP:
Ver original<?php
// *** Validate request to login to this site.
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) { $_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['log'])) { $loginUsername=$_POST['log'];
$password=$_POST['pwd'];
$MM_fldUserAuthorization = "admin_priv";
$MM_redirectLoginSuccess = "jimdvd.html";
$MM_redirectLoginFailed = "index.php";
$MM_redirecttoReferrer = false;
$LoginRS__query=sprintf("SELECT usuario, pass, admin_priv FROM usuarios WHERE usuario=%s AND pass=%s", GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
if ($loginFoundUser) {
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) { $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess ); }
else {
header("Location: ". $MM_redirectLoginFailed ); }
}
?>