Issues with creating Login User
Hi Ray,
I made some modification based on a response from one of the post and its now working. I removed the recordset and changed the Find Record attributes as seen below.
However, I want the system to automatically check the access level as it used to be in the Dreamweaver. I done want users to select their level. In this attached form, I added an inout box for level but I dont want it so. How do I set that so the page checks the Username, Password and Level from the backend
<?php
$Authenticate = new WA_MySQLi_Auth($RMConferenceDBMS);
$Authenticate->Action = "authenticate";
$Authenticate->Trigger = ($_SERVER["REQUEST_METHOD"] === "POST");
$Authenticate->Name = "Admin";
$Authenticate->Table = "admin_login";
$Authenticate->addFilter("user_name", "=", "s", "".((isset($_POST["user_name"]))?$_POST["user_name"]:"") ."");
$Authenticate->addFilter("password", "=", "s", "".((isset($_POST["password"]))?md5($_POST["password"]):"") ."");
$Authenticate->addFilter("level", "=", "s", "".((isset($_POST["level"]))?$_POST["level"]:"") ."");
$Authenticate->storeResult("user_name", "user_name");
$Authenticate->storeResult("password", "password");
$Authenticate->storeResult("level", "level");
$Authenticate->RememberMe = (false);
$Authenticate->SaveLogin = (true);
$Authenticate->AutoReturn = false;
$SuccessRedirect = "dashboard.php";
$FailedRedirect = "loginfailadm.php";
if (function_exists("rel2abs")) $SuccessRedirect = $SuccessRedirect?rel2abs($SuccessRedirect,dirname(__FILE__)):"";
if (function_exists("rel2abs")) $FailedRedirect = $FailedRedirect?rel2abs($FailedRedirect,dirname(__FILE__)):"";
$Authenticate->SuccessRedirect = $SuccessRedirect;
$Authenticate->FailRedirect = $FailedRedirect;
$Authenticate->execute();
?>