Getting RTE editor Content

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jessy
    New Member
    • Oct 2006
    • 106

    Getting RTE editor Content

    hi,
    i have an FreeRTE editor used in my site but whenever i enter something in the TextArea of the editor is not showing in the DB , can anyone tell me what's wrong with my that Piece of Code

    Code:
     function freeRTE_Preload($content) {
    
    //	// Strip newline characters.
    
    	$content = str_replace(chr(10), " ", $content);
    
    	$content = str_replace(chr(13), " ", $content);
    
    //	// Replace single quotes.
    
    	$content = str_replace(chr(145), chr(39), $content);
    
    	$content = str_replace(chr(146), chr(39), $content);
    
    //	// Return the result.
    
    	return $content;
    
    }	
    
    $content = freeRTE_Preload("") ; 
    
    <script>
    
    initRTE('<?echo $content ;?>', 'example.css');
    
    </script>
    How can i Get that Content Variable Through POST ??
  • xNephilimx
    Recognized Expert New Member
    • Jun 2007
    • 213

    #2
    Just do a var_dump( $_POST ); and see what's in there.
    Or see in the RTE editor code, where's the name of the textarea field (probably hidden) that keep sthe code. That's probably the one.

    But it is easier to just do var_dump.

    Regards,

    Comment

    • jessy
      New Member
      • Oct 2006
      • 106

      #3
      Simply, U R GREAT !

      I never Knew That Var_dump() function
      Everyday i Learn Something New From You Gr8 People
      I LOVE YOU bytes ;)

      Comment

      • xNephilimx
        Recognized Expert New Member
        • Jun 2007
        • 213

        #4
        LOL, believe me, var_dump is a life saver.
        Glad it helped!

        Kind regards.

        Comment

        • pbmods
          Recognized Expert Expert
          • Apr 2007
          • 5821

          #5
          Heya, jessy.

          More information is available here:

          PHP: var_dump - Manual

          print_r() is also a popular debugging function (PHP: print_r - Manual).

          Comment

          • Atli
            Recognized Expert Expert
            • Nov 2006
            • 5062

            #6
            Originally posted by pbmods
            print_r() is also a popular debugging function
            My favorite PHP function :)
            [code=php]echo "<pre>", print_r($_POST, true), "</pre>";[/code]

            Comment

            Working...