1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| <?php
$_SESSION['langage'] = 'PHP 5';
include_once("../../fonctions-panier.php");
if(isset($_POST) && !empty($_POST['login']) && !empty($_POST['password']))
{
$connect=ODBC_connect("TESTPHP5","sa","sasa");
// mysql_connect("localhost","sa","sasa");
//mysql_select_db("testphp5");
$mysql = "SELECT login, valide FROM utilisateur WHERE login = '".$_POST['login']."' AND password = '".$_POST['password']."' limit 1";
$req = ODBC_exec($connect, $mysql);
// $req=mysql_query($mysql) or die($mysql."<br />".mysql_error());
//list($ok, $valide)=mysql_fetch_row($req);
list($ok)=odbc_fetch_row($req);
if(!$ok){
$erreur="<center><font color=red style=font-size:0.7em>Mauvais login ou mot de passe</font></center>";
}elseif(!$valide){
$erreur="<center><font color=red style=font-size:0.7em>Votre compte n'est pas encore valider, veuillez suivre les instructions de votre email</font></center>";
} else {
session_start();
$_SESSION['login'] = $_POST['login'];
header("location: modes_paiement.php");
}
odbc_close($connect);
//mysql_close();
}else{
}
?> |
Partager