Syntaxe d’utilisation d’une base de données MySQL

Author:

 base de données
Download

<html>
<head>
<title>Base de données</title>
</head>
<body>

<?php

mysql_connect("localhost", "root", "d")
or die ("Serveur introuvable ou connexion impossible");
mysql_select_db("Cours");

$requete = "SELECT * FROM etudiant";
$result = mysql_query($requete);
if($result)
{
    while($etudiant = mysql_fetch_array($result))
    {
        $nom = $etudiant["NomComplet"];
        echo "Nom: ".$nom;
    }
}
?>

</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *


6 × = forty eight