Ok, ok je me suis creusé les méninges donc: j'ai 2 pages.
<?php
$base = mysql_connect ('localhost', 'root', '');
mysql_select_db ('ladle', $base) ;
?>
<html>
<head>
<title>TinyMCE Test</title>
<script language="javascript" type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions",
theme_advanced_buttons1_add_before : "save,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
theme_advanced_resizing : true,
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
external_link_list_url : "example_data/example_link_list.js",
external_image_list_url : "example_data/example_image_list.js",
valid_elements : "?[*]",
verify_html : true,
flash_external_list_url : "example_data/example_flash_list.js"
});
</script>
</head>
<body>
<?php
$sql = 'SELECT content FROM pages WHERE id = "1"';
$req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
$data = mysql_fetch_array($req);
mysql_free_result ($req);
mysql_close ();
?>
<form method="post" name="editer">
<textarea name="contenu" cols="50" rows="15"><?php echo $data['content']; ?></textarea>
<input type="submit" id="button" name="content" value="Sauvegarder" action="test.php"/>
</form>
</body>
</html>
J'ai intégré TinyMCE, j'ai testé, il m'affiche correctement le contenu de content pour id=1. Ensuite (dans le même dossier):
J'ai fait un petit truc comme vous m'avez dit.
Enfin, ça ne marche pas. Je ne suis pas sur de la méthode... Pourriez vous m'éclairer?