Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP form sending with variables issue
    primarykey
    data
    text
    <p>I am struggling with PHP AJAX CKEDITOR and MySQL as I would like to save everything from the screen (includes input text boxes) and CKeditor text to an mysql by pressing a button at the bottom.</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;?php include("db_connect.php"); ?&gt; &lt;?php include("menu.php"); ?&gt; &lt;h1&gt;New Project&lt;/h1&gt; &lt;form method="post" action=""&gt; New project name:&lt;input type="text" name="pr-name" placeholder="new project name..."&gt;&lt;br/&gt; New project end date:&lt;input type="text" name="pr-end" placeholder="date..."&gt;&lt;br/&gt; New project type: &lt;select name="pr-menu"&gt; &lt;?php $listdata = mysql_query("SELECT * FROM lists WHERE tag='prtype' ORDER BY listing ASC"); while($listresult = mysql_fetch_array($listdata)) { $link = ''; if($listresult['listing'] != '...') { $link = $listresult['value'] . ".php"; echo "&lt;option value='$link'&gt;${listresult['listing']}&lt;/option&gt;"; } } ?&gt; &lt;/select&gt; &lt;div id="page"&gt; &lt;!-- container for loaded page --&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; $("select[name=pr-menu]").change(function() { var url = $("option:selected", this).val(); // Load a page to the container $("#page").load(url); }); &lt;/script&gt; &lt;/form&gt; &lt;?php if($_REQUEST["submit"] == "continue -&gt;") { $prname = mysql_real_escape_string ($_REQUEST["pr-name"]); $prend = mysql_real_escape_string ($_REQUEST["pr-end"]); $prmenu = mysql_real_escape_string ($_REQUEST["pr-menu"]); $prcontent = mysql_real_escape_string ($_REQUEST["pagecontent"]); $sql = "INSERT INTO projects (name,enddate, sel, content) VALUES('$prname','$prend', '$prmenu', '$prcontent')"; mysql_query($sql); } ?&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Which code select different php files to extend the form. One of the form has CKEDITOR as well.</p> <pre><code>&lt;textarea class="ckeditor" name="pagecontent" id="pagecontent"&gt;&lt;/textarea&gt; &lt;?php include_once "ckeditor/ckeditor.php"; $CKEditor = new CKEditor(); $CKEditor-&gt;basePath = 'ckeditor/'; // Set global configuration (will be used by all instances of CKEditor). $CKEditor-&gt;config['width'] = 600; // Change default textarea attributes $CKEditor-&gt;textareaAttributes = array(“cols” =&gt; 80, “rows” =&gt; 10); $CKEditor-&gt;replace("pagecontent"); ?&gt; &lt;input id="submitButton" type="submit" value="continue -&gt;"/&gt; </code></pre> <p>And I would like to put the up two input AND the edited CKEDITOR content in a SQL...</p> <p>I just can't find the solution how to link these together... and I have spent a few hours as a beginner... :( hope someone can help.</p> <p>Thank you very much in advance</p> <p>Andras</p>
    singulars
    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.
    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