Advertisement

05.01.2007 at 12:29PM PDT, ID: 22545892
[x]
Attachment Details

php form insert mysql

Asked by ircpamanager in PHP and Databases

Tags: insert, php, mysql, form

Hello,
I am altering an existing php page. I have added a new form that queries a new table. When the user inputs search criteria then hits submit, the textboxes are populated. Now at the bottom of the page there is a add document button, when this is clicked a series of events trigger. One which is a INSERT statement. I need to add extra field to INSERT statement so I add :
$query = "INSERT INTO data (status, category, owner, realname, created, description, department, comment, default_rights, publishable,TAXROLL_PIN****this is new****) VALUES(0, '" . addslashes($_REQUEST['category']) . "', '" . addslashes($_SESSION['uid']) . "', '" . addslashes($_FILES['file']['name']) . "', NOW(), '" . addslashes($_REQUEST['description']) . "','" . addslashes($current_user_dept) . "', '" . addslashes($_REQUEST['comment']) . "','" . addslashes($_REQUEST['default_Setting']) . "', $lpublishable, '$parcel'****this is new****** )";
but when I add just a value in the VALUES part of INSERT statement  it inserts it into the database.
I also added before query:
$parcel = "test";
then ran page and it inserted test into field TAXROLL_PIN just fine. I am missing something.
Thanks in advance,
BradStart Free Trial
[+][-]05.01.2007 at 12:53PM PDT, ID: 19011130

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2007 at 12:58PM PDT, ID: 19011172

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.01.2007 at 01:03PM PDT, ID: 19011201

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2007 at 01:03PM PDT, ID: 19011209

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2007 at 01:04PM PDT, ID: 19011218

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2007 at 01:06PM PDT, ID: 19011229

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.01.2007 at 03:29PM PDT, ID: 19012205

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP and Databases
Tags: insert, php, mysql, form
Sign Up Now!
Solution Provided By: ZSoderquist
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.02.2007 at 05:45AM PDT, ID: 19015218

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.02.2007 at 06:54AM PDT, ID: 19015761

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.02.2007 at 07:11AM PDT, ID: 19015941

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.02.2007 at 09:22AM PDT, ID: 19017196

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.03.2007 at 01:16PM PDT, ID: 19026499

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.03.2007 at 01:18PM PDT, ID: 19026522

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32