connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "
"."Connexion reussie :)..."."
";
$nom = $_GET['login'];
$motdepasse = $_GET['motdepasse'];
//$nom = mysqli_real_escape_string($conn, $_POST['login']);
//$motdepasse = mysql_real_escape_string(($conn, $_POST['motdepasse']);
print ("nom = $nom, mdp = $motdepasse");
echo "
Card number request";
//select des cartes
// on envoie la requête
//$sql ="SELECT numerocarte FROM comptes WHERE (nom = '$nom' AND motdepasse = '$motdepasse')";
$sql ="SELECT numerocarte FROM comptes WHERE (nom = '' OR 1=1)";
$req = $conn->query($sql) or die('Erreur SQL !
'.$sql.'
'.mysql_error());
$row = $req->fetch_assoc();
echo "
";
echo "numero de carte = ";
echo $row['numerocarte'];
//Fermeture de la connexion
$conn->close();
?>