Note that there are some explanatory texts on larger screens.

plurals
  1. POphp form issue with mysql
    text
    copied!<p>I am trying to write a little project management webapps as a newby - I do appologise for this but I could not find any near...</p> <p>So I have x type of project which can be select and load through AJAX.</p> <p>Every type has at least 2-3 steps to complete them so I need more php pages.</p> <p>I have spent lots of time to figure it out but it is time to ask someone who knows the answer.</p> <p>Question: When User presses the Submit button I need to check if all the input box are correct and then save to a SQL table and then move to the next page if any of these would fail I have to stop.</p> <p>code:</p> <pre><code>&lt;form id="pdf" method="post"&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; &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"); $sbmt_caption = "continue -&gt;"; if ($_POST["submit_name"]==$sbmt_caption) { $prname = mysql_real_escape_string ($_POST["pr-name"]); $prend = mysql_real_escape_string ($_POST["pr-end"]); $prmenu = "pdf"; $prcontent = mysql_real_escape_string ($_POST["pagecontent"]); $sql = "INSERT INTO projects (pr-name,enddate, sel, content) VALUES('$prname','$prend', '$prmenu', '$prcontent')"; $result = mysql_query($sql); if (!$result){ echo mysql_error(); } } ?&gt; </code></pre> <p>"/></p> <p>this code with the mysql_query bit even doesn't work for me some reason. </p> <p>Could anyone give me some hint? </p>
 

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