Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have questions for you:</p> <ol> <li><p>$menuID contains the id of something and you use it to fetch it from table by this ID. It's right?</p></li> </ol> <p>If it's right you must pass this ID to the PHP handler page.</p> <p>Example:</p> <p>index.php:</p> <pre><code>&lt;script type="text/javascript"&gt; jQuery(function($){ $('h2.editableText, p.editableText').editableText({ newlinesEnabled: false }); $.editableText.defaults.newlinesEnabled = true; $('div.editableText').editableText(); $('.editableText').change(function(){ var newValue = $(this).html(); // important code: $.ajax({ type: "POST", url: "save.php", data: { val : newValue, key:$(this).parent().tagName, id:$(this).parent().attr('class')}, success: function(msg){ alert( "Data Saved: " + msg ); } }); }); }); &lt;/script&gt; </code></pre> <p>and body part:</p> <pre><code>&lt;body&gt; &lt;div id="wrapper"&gt; &lt;div id="content"&gt; &lt;?php $isnull = getContent($menuID, "title"); if ($isnull != "") { echo "&lt;h2 class=\"editableText\"&gt;&lt;center&gt;&lt;p&gt;" . getContent($menuID, "title") . "&lt;/p&gt;&lt;/center&gt;&lt;/h2&gt;&lt;br&gt;"; } else { null; } ?&gt; &lt;div class="editableText"&gt; &lt;p class="&lt;?php echo $menuID?&gt;"&gt;&lt;?php echo getContent($menuID, "maincontent");?&gt;&lt;/p&gt; &lt;/div&gt; &lt;/script&gt; &lt;?php mysql_close($connection); ?&gt; </code></pre> <p></p> <p>and one more, <strong>save.php:</strong></p> <pre><code>&lt;?php # content that you send from client; you must save to maincontent $content=$_POST['val']; # $from=='div' if it from maincontent or $from=='center' if it from title $from=$_POST['key']; # id of your post $id=$_POST['id']; #here you can save your content; ?&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.
    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