خرید بک لینک

Vote count: 0

this validation page doesn't show error and doesn't redirect to the home page. I check if it reach the verifying from the databse and it works fine but doesn't redirect the page so I think that the problem is with "$user = $req->fetch()" help plz

if(isset($_POST['login'])){

 $useame = $_POST['useame'];
$password = $_POST['password'];
 $pc = md5($password);

$req = $pdo->prepare('SELECT * FROM users WHERE nom= :useame AND pass= :password');
$req->execute(array(
    'useame' => $useame,
    'password' => $pc,
    ));

 if ($user = $req->fetch()) {
    $_SESSION['auth'] = $user;
    header("location:home.php");
    exit();

 }

 else{
 echo"<script> alert('LE NOM D UTILISATEUR OU LE MOTS DE PASSE INCORRECTE')</script>";
}

asked 19 secs ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 26 فروردين 1395 ساعت: 7:56

صفحه بندی