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 39
| <?php
if (isset($_POST['auteur']) AND isset($_POST['titre']) AND isset($_POST['contenu']))
{
$Auteur=$_POST['auteur'];
$Titre=$_POST['titre'];
$Contenu=$_POST['contenu'];
mysql_connect ("sql.free.fr", "jouonscurieux", "motdepasse");
mysql_select_db("jouonscurieux");
mysql_query(INSERT INTO articles(ID, Titre, Auteur, Contenu,) VALUES('', $Titre, $Auteur, $Contenu,));
mysql_close();
}
else
{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
</head>
<body>
<form action="article.php">
<p>
vous n avez pas rempli tout les champs! </br>
Auteur: </br>
<input type="text" name="auteur">
Titre: </br>
<input type="text" name="titre">
article : </br>
<input type="text" name="contenu">
<input type="submit">
</form>
</body>
</html>
?> |
Partager