Bonjour,
Je ne voi pas comment je peu l'insérer dans mon code (probleme avec header !)
<?php
include("FCKeditor/fckeditor.php") ;
$hote = "localhost";
$utilisateur = "root";
$mPasse = "";
$base = "test";
$connexion = mysql_connect($hote, $utilisateur, $mPasse) or die ("connexion au serveur impossible");
$db = mysql_select_db($base, $connexion) or die ("impossible d'ouvrir la base de données");
if ((isset($_POST['txt1'])) && (isset($_POST['txt2'])))
{
$data1 = mysql_real_escape_string(trim($_POST['txt1']));
$data2 = mysql_real_escape_string(trim($_POST['txt2']));
$res1 = mysql_query("UPDATE textes SET text = '".$data1."' WHERE num_text = 1");
$res2 = mysql_query("UPDATE textes2 SET text = '".$data2."' WHERE num_text = 1");
if (!$res1)
die("Erreur de sauvegarde!".mysql_error());
if (!$res2)
die("Erreur de sauvegarde!".mysql_error());
}
?>
<html>
<head>
<title>cadre_milieu</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
.Style2 {font-weight: bold; font-size: 36px; font-family: "Comic Sans MS"; color:#000066}
.Style5 {font-size: 12px}
-->
</style>
</head>
<body>
<h1 align="center" class="Style2"><img src="fantastique.jpg" width="956" height="200"></h1>
<center>
<form action="index2.php" method="post">
<?php
$query = mysql_query("SELECT text FROM textes WHERE num_text = 1");
$data1 = mysql_fetch_array($query);
$oFCKeditor = new FCKeditor('txt1') ;
$oFCKeditor->BasePath = '/FCKeditor/';
$oFCKeditor->Width = '60%' ;
$oFCKeditor->Height = '200' ;
$oFCKeditor->Value = $data1["text"];
$oFCKeditor->Create() ;
$oFCKeditor->Config['CustomConfigurationsPath'] = '/fckconfig.js' ;
?>
</form>
<br>
<form action"index2.php" method="post">
<input name="submit" type="submit" value="Exporter au format XLS">
<input type="submit" value="Exporter au format PDF">
</form>
<br>
<form action="index2.php" method="post">
<?php
$query = mysql_query("SELECT text FROM textes2 WHERE num_text = 1");
$data2 = mysql_fetch_array($query);
$oFCKeditor = new FCKeditor('txt2') ;
$oFCKeditor->BasePath = '/FCKeditor/' ;
$oFCKeditor->Width = '60%' ;
$oFCKeditor->Height = '200' ;
$oFCKeditor->Value = $data2["text"];
$oFCKeditor->Create() ;
$oFCKeditor->Config['CustomConfigurationsPath'] = '/fckconfig.js' ;
?>
</form>
<br>
<form action"index2.php" method="post">
<input name="submit" type="submit" value="Exporter au format XLS">
<input type="submit" value="Exporter au format PDF">
</form>
<br>
</center>
</body>
</html>
<?php
mysql_close($connexion);
?>
help me please !!! merci d'avance
Proverbe Chinois : Casser un cruche vide sur votre tête, si ça sonne creux, n'en déduisez pas seule
que c'est la cruche qui est vide ... :-D