Merge branch 'action&exception' of https://codefirst.iut.uca.fr/git/anna.boudoul/ProjetPHP into action&exception

merge
action&exception
Anna BOUDOUL 2 years ago
commit 1aed93194b

@ -3,8 +3,8 @@
$rep=__DIR__.'/../';
//$con = new Connection('mysql:host=localhost;dbname=phpproject', 'nifranco', 'achanger');
$con = new Connection('mysql:host=localhost;dbname=dbanboudoul', 'anboudoul', 'mdpMYSQL');
$con = new Connection('mysql:host=localhost;dbname=phpproject', 'nifranco', 'achanger');
//$con = new Connection('mysql:host=localhost;dbname=dbanboudoul', 'anboudoul', 'mdpMYSQL');
$TMessage = array();

@ -118,7 +118,9 @@ class VisitorCtrl
}
function connection(){
$this->userModel->connexion($_POST['username'],$_POST['password']);
$isCo = $this->userModel->connexion($_POST['username'],$_POST['password']);
if($isCo)
$this->TMessage[] = 'This user does not exist'; require($this->TabVues["erreur"]);
$this->loadHome();
}

@ -1,7 +1,6 @@
<?php
require("config/config.php");
require('config/Validation.php');
require("view/erreur.php");
require_once("controller/FrontCtrl.php");
$fc = new FrontCtrl($con, $TabVues);
?>

@ -17,10 +17,11 @@
Validation::val_form_mdp($mdp, $TMessage);
$result = $this->gat->findUser($login, $mdp);
if(!isset($result)) echo 'not set works';
else
{
if(!isset($result)){
return false;
} else {
$_SESSION['login'] = $result;
return true;
}
}

Loading…
Cancel
Save