Ho un curioso problema con FCK Editor.
Form:
Codice PHP:
<table width="100%" border="0" cellpadding="0" cellspacing="0"><form action="<?php echo "../action/update_pages_center.php?Nome_Pag=$_GET[Nome_Pag]"?>" method="post">
          
          <tr>
            <td height="21" colspan="3" align="center" valign="top" bgcolor="#FFFFFF"><span class="Titolo01_rosso">Gestisci: &quot;<? echo $elenco['Titolo_Center']; ?>&quot;</span></td>
          </tr>
          <tr>
            <td height="5" colspan="2" valign="top">[img]../interfaccia/spacer.gif[/img]</td>
            <td width="5"></td>
          </tr>
          <tr align="center" valign="middle" bgcolor="#FFFFFF">
            <td height="25" colspan="3" class="Sottotitolo02_nero">Subito dopo l'immagine sotto il titolo (se presente), puoi inserire del testo, correttamente formattato.</td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="5" colspan="3" valign="top">[img]../interfaccia/spacer.gif[/img]</td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="15" colspan="3" valign="middle" bgcolor="#FFFFFF" class="Sottotitolo01_nero">Primo campo di testo:</td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="321" colspan="3" valign="top" bgcolor="#FFFFFF">
              <?php
$oFCKeditor
->BasePath '/fckeditor/' ;    
$sBasePath $_SERVER['PHP_SELF'] ;
$sBasePath substr$sBasePath0strpos$sBasePath"_samples" ) ) ;

$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath    $sBasePath ;
$oFCKeditor->Value        $elenco['Testo_Main_1'];
$oFCKeditor->Create() ;
?></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="5" colspan="3" valign="top" bgcolor="#FFDD02">[img]../interfaccia/spacer.gif[/img]</td>
          </tr>
          <tr align="center" valign="middle" bgcolor="#FFFFFF">
            <td height="25" colspan="3" bgcolor="#FFFFFF"><span class="Sottotitolo02_nero">Se hai deciso di inserire una seconda immagine, puoi proseguire con del testo sotto di essa qui: </span></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td width="540" height="5" valign="top">[img]../interfaccia/spacer.gif[/img]</td>
            <td width="5"></td>
            <td></td>
          </tr>
          <tr>
            <td height="15" colspan="3" valign="top" bgcolor="#FFFFFF"><span class="Sottotitolo01_nero">Secondo campo di testo:</span></td>
          </tr>
          <tr>
            <td height="321" colspan="3" valign="top" bgcolor="#FFFFFF"><?php
    
$sBasePath 
$_SERVER['PHP_SELF'] ;
$sBasePath substr$sBasePath0strpos$sBasePath"_samples" ) ) ;

$oFCKeditor = new FCKeditor('FCKeditor2') ;
$oFCKeditor->BasePath    $sBasePath ;
$oFCKeditor->Value        $elenco['Testo_Main_2'];
$oFCKeditor->Create() ;
?></td>
          </tr>
          <tr>
            <td height="5" colspan="3" valign="top">[img]interfaccia/spacer.gif[/img]</td>
          </tr>
          <tr>
            <td height="24" colspan="3" valign="middle" bgcolor="#FFFFFF">
              <div align="center">
                <input name="submit222" type="submit" value="Salva parte centrale">
              </div></td>
          </tr>
            </form></table>
Pagina di inserimento:
Codice PHP:

<?PHP

include "../vars.php";

$sqlconnmysql_connect ($dbhost,$dbutente,$dbpass);
mysql_select_db ($database$sqlconn);
$res mysql_query("SELECT * FROM Pagine_Statiche") or die (mysql_error());

//ricavo i dati del torneo

if ( isset( $_POST ) )
   
$postArray = &$_POST ;            // 4.1.0 or later, use $_POST
else
   
$postArray = &$HTTP_POST_VARS ;    // prior to 4.1.0, use HTTP_POST_VARS

foreach ( $postArray as $sForm => $value )
{
    
$postedValue htmlspecialcharsstripslashes$value ) ) ;
    
}
//uppo il campo approvato nel database


mysql_query("UPDATE Pagine_Statiche SET Testo_Main_1='$postedValue' WHERE Nome_Pag='$_GET[Nome_Pag]'");
        


?>
Fate caso solo al primo campo, per ora ho deciso di gestire soloq quello. Indovinate cosa inserisce in Testo_Main_1... "Salva parte centrale" ... perchè diavolo inserisce il testo del pulsante ignorando ciò che scrivo? Curioso a dir poco