Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

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

 base de données
{filelink=12770}

<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>

No comments yet.

Leave a Comment