Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6355113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:41:58+00:00 2026-05-24T22:41:58+00:00

I am trying to write a little project management webapps as a newby –

  • 0

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…

So I have x type of project which can be select and load through AJAX.

Every type has at least 2-3 steps to complete them so I need more php pages.

I have spent lots of time to figure it out but it is time to ask someone who knows the answer.

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.

code:

<form id="pdf" method="post">
New project name:<input type="text" name="pr-name" placeholder="new project name..."><br/>
New project end date:<input type="text" name="pr-end" placeholder="date..."><br/>

<textarea class="ckeditor" name="pagecontent"  id="pagecontent"></textarea>

<?php
    include_once "ckeditor/ckeditor.php";
    $CKEditor = new CKEditor();
    $CKEditor->basePath = 'ckeditor/';

   // Set global configuration (will be used by all instances of CKEditor).
   $CKEditor->config['width'] = 600;   
    // Change default textarea attributes
   $CKEditor->textareaAttributes = array(“cols” => 80, “rows” => 10);

   $CKEditor->replace("pagecontent");


$sbmt_caption = "continue ->";
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();
  }
}
?>

“/>

this code with the mysql_query bit even doesn’t work for me some reason.

Could anyone give me some hint?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:41:59+00:00Added an answer on May 24, 2026 at 10:41 pm

    Four tips:

    1. Check if your query success and ouput errors if any with

      $result = mysql_query($sql);
      if (!$result){
           echo mysql_error();
      }
      
    2. Use prepared statements instead of direct embedding parameters into a query string

      $stmt = $pdo->prepare("INSERT INTO projects (pr-name,enddate, sel, content) VALUES(?,?,?,?)");
      $stmt->execute(array($prname,$prend, $prmenu, $prcontent))
      
    3. Use $_POST instead of $_REQUEST. $_REQUEST array is build up from cookie,get,post and session according to variables_order php.ini directive, so you may just get your values overwritten.

    4. your submit button is not posted at all. So add name attribute to it and check it in your if statement. Also, don’t use just plain string continue ->. Store it in the variable and use it.

      $sbmt_caption = "continue ->";
      if ($_POST["submit_name"]==$sbmt_caption){
          //your processing here
      }
      
      <input id="submitButton" name="submit_name" type="submit" value="<?php echo $sbmt_caption?>"/>
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is going to be a little tricky to explain. I'm trying to write
I'm trying to write a little Messagecenter for my Project. The problem I'm running
I'm trying to write a little software for logging data, if any type of
I am trying to write a little method in java, but I cannot figure
I'm trying to write a little SQL Helper. I have a query like this
I've got this little batch file I'm trying to write for a Windows 7
I'm trying to write a little Emacs Lisp script that reads a csv file
I'm trying to write a little helper for Windows which eventually will accept a
I'm trying to write a quick little java application to read the contents of
I'm trying to write a simple Resource Manager for the little hobby game I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.