I will probably need a premium support ticket on this. However, I have tried to update one of my log-in forms by joining the new table with an existing table using the common email address. However, I am getting "There is an error in your SQL syntax" when I try to log-in. So something is not right.
sa_user is my new table
class_admin is the data table I need to access
and
sa_password is the new encrypted password
class_email and sa_email are identical in both tables
Thanks for any help.
-----------------------------
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$Authenticate = new WA_MySQLi_Auth($mysqli2);
$Authenticate->Action = "authenticate";
$Authenticate->Name = "user";
$Authenticate->Table = "sa_user";
$Authenticate->addFilter("sa_password", "=", "s", "".((isset($_POST["sa_password"]))?$_POST["sa_password"]:"") ."");
$Authenticate->addFilter("class_email", "=", "s", "".((isset($_POST["class_email"]))?$_POST["class_email"]:"") ."");
$Authenticate->storeResult("class_admin_id", "class_admin_id");
$Authenticate->AutoReturn = false;
$SuccessRedirect = "en/index.php";
$FailedRedirect = "log_in_failed_en.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();
}?>
<?php
$rsMarket = new WA_MySQLi_RS("rsMarket",$mysqli2,1);
$rsMarket->setQuery("SELECT * FROM class_admin INNER JOIN sa_users ON class_email = sa_email WHERE class_admin_id = ?");
$rsMarket->bindParam("i", "".(isset($_GET['class_admin_id'])?$_GET['class_admin_id']:"") ."", "-1"); //colname
$rsMarket->execute();
?>