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 35 36 37 38
|
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset ="utf-8">
<link rel="stylesheet" href="accueil.css"/>
</head>
<body>
<?php
try{
require('../codephp.php');
$maconnexion = new PDO("mysql:host=localhost;".MABD,USERNAME,MDP);
if($maconnexion !== FALSE)
echo "Connexion réussie"; //Ca s'affiche bien
} catch(PDOException $e){ die('Erreur : '.$e->getMessage()); }
$result=$maconnexion->query("select * from CARNET");
if(!$result)
echo "</br>Problème d'accès à la table.</br>"; //Ce message s'affiche...
foreach($result as $row)
echo $row['NOM']; // aucun affichage
echo "Nom d'utilisateur : ";
print_r($_POST['nomUtilisateur']); // ces 4 affichages marchent
echo " Mot de passe : ";
print_r($_POST['motDePasse']);
?>
</body>
</html> |
Partager