Page 1 sur 1

Récupération de variable javascript dans une variable php

Posté : 26 juin 2006, 10:21
par fred9999
Voila j'utilise FCKeditor, et voici le code de ma page(voir si dessous)
je l'envoie vers un fichier php sensé le traiter .
<?
include "../../../blog/conec.php";
$query = "Select * from intrasssscat order by nom;";
$result = mysql_query($query, $db_conn) or die( "ERREUR MYSQL numéro: ".mysql_errno()."<br>Type de cette erreur: ".mysql_error()."<br>\n" ) ;
if (isset($_POST['select']))
{
$num=$_POST['select'];
$query1 = "Select * from intrasssscat where numsssscat='$num';";
$result1 = mysql_query($query1, $db_conn) or die( "ERREUR MYSQL numéro: ".mysql_errno()."<br>Type de cette erreur: ".mysql_error()."<br>\n" ) ;
while( $print1 = mysql_fetch_row( $result1 ) )
	{
	$nom=$print1[1];
	$page=$print1[2];
	}

}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../../../ml.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../FCKeditor/fckeditor.js">
</script>
</head>
<body>
<form name="form2" method="post" action="modif.php">
<table width="100%"  border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
  <tr>
    <td><div align="center"><strong>PAGE :</strong>
          <select name="select">
         <option></option>
<? 
	while( $print = mysql_fetch_row( $result ) )
	{		
	echo"<option value=\"$print[0]\">$print[1]</option>";
	}
?>
          </select>
        <input name=""  value="Modifier" type="submit">
    </div>
    </form></td>
  </tr>
  <form method="post" action="enremod.php" name="form1">
  <tr>
    <td ><strong>&nbsp;&nbsp;&nbsp;Menu : </strong>
      <input name="menu" type="text" id="menu" size="70" value="<? echo"$nom"; ?>"><input name="nmenu" type="hidden" value="<? echo"$num"; ?>"></td>
  </tr>
  <tr>
    <td align="center">
	<?
	$page=str_replace("<br />","",$page);
	?>
//déjà là j'ai un problème car lorsque je modifie un document avec FCKeditor je ne peut plus l afficher ensuite???
<script type="text/javascript">
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('../../../FCKeditor/')) ;
var oFCKeditor = new FCKeditor( 'page' ) ;
oFCKeditor.BasePath	= '../../../FCKeditor/' ;
oFCKeditor.Height	= 450 ;
oFCKeditor.Value	= '<?  echo"$page"; ?>';
oFCKeditor.Create() ;
//-->
</script>
	</td> 
  </tr>
  <tr>
    <td >&nbsp;</td>
  </tr>
  <tr>
    <td><div align="center"><input name="Retour" type="button" onClick="javascript:history.go(-1)" value="Retour">&nbsp;
      <input type="submit" name="Submit" value="Envoyer">
    </div></td>
    </tr>
</table>
</form>
</body>
</html>
Le problème c'est quand j'essaie de modifier des données que j'ai modifié avec FCKeditor je ne peut pas les faire se réafficher