On m´a donné ça :
< ?
$date = strftime("%d-%m-%Y");
if ( isset($pseudo) AND isset($titre) AND isset($contenu) AND isset($date))
{
$db = mysql_connect("localhost", " root", " ");
mysql_select_db("imagienation", $db);
$titre = trim($titre);
$contenu = trim($contenu);
mysql_query("INSERT INTO news VALUES(´´, ´$pseudo´, ´$titre´, ´$contenu´, ´$date´)") or die("erreur survenue :<br>".mysql_error());
mysql_close();
}
else
{
? >
< form action="Ajoutnews2.php" method="post">
< center>
Pseudo<br><input type="text" name="pseudo"><br><br>
Titre<br><input type="text" name="titre"><br><br>
Contenu<br><textarea rows="5" name="contenu" cols="50"></textarea><br><br>
< input type="submit" value="Envoyer">
< /center>
< /form>
< ?
}
? >
Mais ça marche pas non plus
