i've tried every trick i know and they won't work this is the code : the result shows me blacnk page with no errors please help me out i'm an amateur
<?php
if (isset($_POST['username']) && isset($_POST['mdp']))
{
//creation objet base de donnée
//requête
try
{
$db = new
PDO('mysql:host=localhost;dbname=ecrmanager','root','');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
$req = $db->prepare('SELECT idUti FROM utilisateur WHERE
nomUti=? AND mdp =?');
$req->execute(array($_POST['username'] ,sha1($_POST['mdp'])));
}
catch(Exception $e)
{
die('Erreur :'.$e->getMessage());
}
$resultat = $req->fetch();
if (!$resultat)
{
header('location:login.php?con=0#signin');
exit();
}
else
{
//A changer après bdd wiring
header('location:profil.php');
exit();
}
}