Jump to content

Posting info from CKEditor to txt file


Recommended Posts

Hi guys,


i currently have a page in my phpbb that has the CKEditor on it.  Below is the editor.php


define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

    // Start session management
  if ($user->data['user_id'] == ANONYMOUS)
    login_box('', $user->lang['LOGIN']);


        'body' => 'editor.html',



And here is the HTML page editor.html


<!-- INCLUDE overall_header.html -->

  <script type="text/javascript" src="/ckeditor/ckeditor.js"></script> 

  <textarea name="text1"></textarea>

  <script type="text/javascript">
    CKEDITOR.replace( 'text1' );

<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->


I would like to submit the info from the textarea to a file called announce.txt.  Could anyone help me out with this?

Link to comment
Share on other sites

Thanks for that.  Prior to reading this i managed to work out the form part.  It all works well now.  But my output file save.php is quite plain.  How would i wrap it in PHPBB headers and footers?


I wouldn't.  I would have a redirect after the file save that redirected them back to a certain page.

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.