Mais elle m'enregistre rien dans la bd ... Je ne comprend pas pourquoi :
La page ::
<!–– Le corps ––>
<div id="corps">
<center><h2>Zone Admin</h2></center><br><br>
<?
if(isset($_POST['message']) AND isset($_POST['titre']) )
{
mysql_query("INSERT INTO actualite('','".$_POST['titre']."','".$_POST['message']."','".$_SESSION['pseudo']."','".time()."') ");
echo "<center>Cette News a été ajoutée. Vous allez être redirigé</center>";
echo "<META HTTP-EQUIV=Refresh CONTENT='2; URL=admin.php'>";
}
?>
<?
if(!isset($_POST['message']) AND !isset($_POST['titre']) )
{
?> <fieldset>
<br>
<center><a href="javascript:surroundText('[b]', '[/b]', document.postmodify.message);"><img
src="http://www.cybercity2034.com/cc3/forum/Themes/YaBB_dark/images/bbc/bold.gif" align="bottom" width="23" height="22" alt="Gras" border="0"
/></a><a href="javascript:surroundText('[i]', '[/i]', document.postmodify.message);"><img
src="http://www.cybercity2034.com/cc3/forum/Themes/YaBB_dark/images/bbc/italicize.gif" align="bottom" width="23" height="22" alt="Italique"
border="0" /></a><a href="javascript:surroundText('[u]', '[/u]', document.postmodify.message);"><img
src="http://www.cybercity2034.com/cc3/forum/Themes/YaBB_dark/images/bbc/underline.gif" align="bottom" width="23" height="22" alt="Souligné"
border="0" /></a><a href="javascript:surroundText('[center]', '[/center]', document.postmodify.message);"><img
src="http://www.cybercity2034.com/cc3/forum/Themes/YaBB_dark/images/bbc/center.gif" align="bottom" width="23" height="22" alt="Centré"
border="0" /></a><a href="javascript:replaceText('[hr]', document.postmodify.message);"><img
src="http://www.cybercity2034.com/cc3/forum/Themes/YaBB_dark/images/bbc/hr.gif" align="bottom" width="23" height="22" alt="Ligne horizontale"
border="0" /></a><a href="javascript:surroundText('[H1]', '[/H1]', document.postmodify.message);"><img
src="http://www.cybercity2034.com/cc3/forum/Themes/YaBB_dark/images/bbc/size.gif" align="bottom" width="23" height="22" alt="Taille du texte"
border="0" /></a><select onchange="surroundText('['+this.options[this.selectedIndex].value+']','[/color]', document.postmodify.message);
this.selectedIndex = 0;">
<option value="" selected="selected">Changer la couleur</option>
<option value="Black">Noir</option>
<option value="Red">Rouge</option>
<option value="Yellow">Jaune</option>
<option value="Pink">Rose</option>
<option value="Green">Vert</option>
<option value="Orange">Orange</option>
<option value="Purple">Pourpre</option>
<option value="Blue">Bleu</option>
<option value="Beige">Beige</option>
<option value="Brown">Brun</option>
</select></center>
<center>
<form action="admin_actualite.php" method="post" name="postmodify" >
titre:<br><input type="text" name="titre" size="50"/><br>Contenu de la News<br> <textarea rows="12" cols="60" name="message"><? echo $contenu
;?></textarea>
<br><br>
<input type="submit" value="envoyer"/>
</form>
</center></fieldset>
<?
}
?>
Je vous fais grace des codes de vérifications admin, menu, etc ...La table que j'utilise est :
Code : Tout sélectionner
`id` int(11) NOT NULL auto_increment,
`titre` text collate latin1_general_ci NOT NULL,
`contenu` text collate latin1_general_ci NOT NULL,
`auteur` text collate latin1_general_ci NOT NULL,
`date` bigint(20) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=6 ;