On question 2)
Hello again and thanks.
This is my code on the page where the login form is:
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
?>
<?php require_once('../Connections/Prueba_MCC_i.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php require_once('../webassist/mysqli/authentication.php'); ?>
<?php
$Recordset1 = new WA_MySQLi_RS("Recordset1",$Prueba_MCC_i,1);
$Recordset1->setQuery("SELECT usuarios.u_email, usuarios.u_password, usuarios.u_nombre_completo FROM usuarios");
$Recordset1->execute();?>
<?php
$Authenticate = new WA_MySQLi_Auth($Prueba_MCC_i);
$Authenticate->Action = "authenticate";
$Authenticate->Trigger = ($_SERVER["REQUEST_METHOD"] == "POST");
$Authenticate->Name = "MCC_usuario";
$Authenticate->Table = "usuarios";
$Authenticate->addFilter("u_email", "=", "s", "".($Recordset1->getColumnVal("u_email")) ."");
$Authenticate->addFilter("u_password", "=", "s", "".($Recordset1->getColumnVal("u_password")) ."");
$Authenticate->storeResult("u_nombre_completo", "u_nombre_completo");
$Authenticate->storeResult("u_email", "u_email");
$Authenticate->RememberMe = false;
$Authenticate->SaveLogin = false;
$Authenticate->AutoReturn = false;
$SuccessRedirect = "edicion.php";
$FailedRedirect = "MCC_error.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();
?>
I would say that it saves session variables. Specifically:
$Authenticate->storeResult("u_nombre_completo", "u_nombre_completo");
$Authenticate->storeResult("u_email", "u_email");
Although now there is another problem: I get the connection errors and neither arrives at the error page nor at the login page. These are the errors that it gives me that have to do with the automatic script generated by MySQLi SB authentication.php
Notice: Undefined property: WA_MySQLi_Auth::$Log in /Applications/MAMP/htdocs/MCC_01_edicion_DW/webassist/mysqli/authentication.php on line 274
Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/MCC_01_edicion_DW/webassist/mysqli/authentication.php:274) in /Applications/MAMP/htdocs/MCC_01_edicion_DW/webassist/mysqli/authentication.php on line 445
--- line 274:
if (sizeof($this->Log) > 0) {
---line 445:
header("location: " . $this->addQuerystring($url));
I do not understand what is happening. Thanks for the help.