
{filelink=12750}
<html>
<head>
<title>Base de données</title>
</head>
<body>
<?php
mysql_connect("localhost","root","");
mysql_select_db("cours");
$id = "5";
$nomComp = "Jhon yalley";
$note= 15;
$requete = "INSERT INTO Etudiant SET id='$id', nomcomplet='$nomComp', note=$note";
$result = mysql_query($requete);
// Afficher un message après l'opération
if ($result)
echo "<p>L'etudiant a été inséré!</p>";
else
echo "<p>Impossible d'insérer l'étudiant!</p>";
// Fermer la connexion
mysql_close();
?>
</body>
</html>