aloa
i've got a problem with my script. first i updated my "text" in the script with the <textarea>. now i have updated my script with fckeditor. the data where given to the fck-editor - it works fine. but when i would like to update something the scripts empty the sql-field $text.
could you please help?
i've got a problem with my script. first i updated my "text" in the script with the <textarea>. now i have updated my script with fckeditor. the data where given to the fck-editor - it works fine. but when i would like to update something the scripts empty the sql-field $text.
could you please help?
<html> <head> <script src="../_functions.inc.js\" type=\"text/javascript\"></script> <link rel=\"StyleSheet\" href=\"main.css\" type=\"text/css\"> <title>Production Update</title> <script languag=JavaScript> <!-- function fitWindowSize() {"; if($art == "feld") echo "this.resizeTo(900, 600);"; else echo "this.resizeTo(900, 600);"; echo " this.moveTo(50, 80); } fitWindowSize(); //--> "; echo " </script> </head> <body> <center> <form name=update method=post action=$SELF_PHP> <input type=hidden name=ID value='$ID'> <input type=hidden name=actionsend value='updaten'> <table cellpadding=0 cellspacing=0 border=0 width=500> <tr> <td><img src=../img/p.gif width=10 height=20></td> </tr> <tr> <td class=adminsubtitel2>Details aendern #$ID</td> </tr> <tr> <td><img src=../img/p.gif width=10 height=20></td> </tr> <tr> <td> <table cellspacing=0 cellpadding= border=0>"; if($art == "txt") { echo " <tr> <td class=tabellentitel style=padding-left:10px;>$feldDE</td> </tr> <tr> <td><input type=text name='textDE' value='$text' size='50'></td> </tr> <tr> <td> </td> </tr> <tr> <td> <input type=button name=reset value='schliessen' onClick=window.close(); class='button'> <input type=submit name='send' value='Daten updaten' class='button'> <input type=hidden name='feldSQL' value='$feldSQL'> </td> </tr> "; } elseif($art == "field") { $sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ; $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = 'FCKeditor/' ; $oFCKeditor->ToolbarSet = 'Basic'; $oFCKeditor->Width = '100%' ; $oFCKeditor->Height = '300' ; $oFCKeditor->Value = $text; $oFCKeditor->Create() ; echo " <tr> <td class=tabellentitel style=padding-left:10px; width=400px>$feldDE</td> <tr> <input type=hidden name='feldSQL' value='$feldSQL'> <tr> <td> </td> </tr> <tr> <td> <a href=javascript:window.close();><img src=../img/close.gif width=25 height=26 border=0> </a> <input type=image src=../img/update.gif name='send' value='Daten updaten' class='button'> </td> </tr> </form>"; } echo " </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </form> </center> </body> </html>";
<?php require('../_dbopen.inc.php'); require('../_functions.inc.php'); include("FCKeditor/fckeditor.php") ; if($actionsend == "updaten") { $sql = "UPDATE switop_fckeditor SET $feldSQL='$textDE' WHERE ID='$ID'"; mysql_query($sql); echo "<script language=JavaScript>"; //alert('nderungen wurden gespeichert'); echo "window.opener.document.location.href='sample07.php?ID=$ID'; this.close(); </script>"; } else { $res = mysql_query("SELECT $feldSQL FROM switop_fckeditor WHERE ID='$ID'", $conn); $num = mysql_num_rows($res); for($i=0; $i<$num; $i++) { $text = mysql_result($res, $i, $feldSQL); } echo " } ?>