Note that there are some explanatory texts on larger screens.

plurals
  1. POCkeditor - How do I "save" to the web page I am editing?
    primarykey
    data
    text
    <p><code>PHP Version 5.3.3-1 Ubuntu 10.10 Apache 2.2</code></p> <p><code>Ckeditor 3.6.1</code></p> <p>I can edit and save but the web page I am editing does not update ? The edited text appears in a new window. I want the web page I am editing to be updated.</p> <p><code>ckeditor.js</code>, <code>test.html</code> and <code>posteddata.php</code> are all in the same directory <code>/var/www/</code></p> <p><strong>test.html</strong></p> <pre><code>&lt; head&gt; &lt; title&gt;Test Page &lt; /title &gt; &lt; meta http-equiv="content-type" content="text/html; charset=utf-8"/ &gt; &lt; script type="text/javascript" src="ckeditor.js"&gt;&lt; /script &gt; &lt; /head &gt; &lt; body &gt; &lt; form action="posteddata.php" method="post" &gt; &lt; textarea id="editor1" name="editor1" &gt; &amp;lt;p&amp;gt;Your text goes here&amp;lt;/p&amp;gt; &lt; /textarea&gt; &lt; script type="text/javascript" &gt; window.onload = function() {CKEDITOR.replace( 'editor1' );}; &lt; /script&gt; &lt; input type="submit" value="Submit"/ &gt; &lt; /form&gt; &lt; /body&gt; &lt; /html&gt; </code></pre> <p><strong>posteddata.php</strong></p> <pre><code>&lt; ?php if ( isset( $_POST ) ) $postArray = &amp;$_POST ; // 4.1.0 or later, use $_POST else $postArray = &amp;$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS foreach ( $postArray as $sForm =&gt; $value ) { if ( get_magic_quotes_gpc() ) $postedValue = htmlspecialchars( stripslashes( $value ) ) ; else $postedValue = htmlspecialchars( $value ) ; ?&gt; &lt; tr&gt; &lt; th style="vertical-align: top"&gt;&lt;?php echo htmlspecialchars($sForm); ?&gt; &lt; /th&gt; &lt; td&gt;&lt;pre class="samples"&gt;&lt;?php echo $postedValue?&gt;&lt;/pre&gt;&lt;/td&gt; &lt; /tr&gt; &lt; ?php } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload