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['cate
gory']) . "', '" . addslashes($_SESSION['uid'
]) . "', '" . addslashes($_FILES['file']
['name']) . "', NOW(), '" . addslashes($_REQUEST['desc
ription'])
. "','" . addslashes($current_user_d
ept) . "', '" . addslashes($_REQUEST['comm
ent']) . "','" . addslashes($_REQUEST['defa
ult_Settin
g']) . "', $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,
Brad
Start Free Trial