NEED HELP INSERTING TO DB
Posted: Wed Aug 27, 2003 7:35 am
I am having serious problems although im sure the solution is relatively simple.
I am trying to insert lines into a db from a form, I keep getting this error>
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /usr/local/httpd/htdocs/do_addrecord.php on line 13
Here is the code I am using >
//putenv("ORACLE_SID=dbone");
putenv("ORACLE_HOME=/u01/oracle/product/9ir2");
$connect=ocilogon("kc_labs", "helpme", "dbone.linux");
$sql = "INSERT INTO KC_CAMPUS.ELECTRONIC_PARTS (PART_NUMBER, PART_CATEGORY, PART_NAME, PART_DESCRIPTION, PART_KIT, PART_LOCATION, PART_COST, PART_PAR) VALUES ('$_POST["PART_NUMBER"]', '$_POST["PART_CATEGORY"]', '$_POST["PART_NAME"]', '$_POST["PART_DESCRIPTION"]', '$_POST["PART_KIT"]', '$_POST["PART_LOCATION"]', $_POST["PART_COST"], $_POST["PART_PAR"]);
$stmt = OCIParse($connect, $sql);
OCIExecute($stmt);
Im using the $_POST["variable"] becuae I am using php 4.3.2 and as I understand, that is how to do it.
Any help is appreciated.
I am trying to insert lines into a db from a form, I keep getting this error>
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /usr/local/httpd/htdocs/do_addrecord.php on line 13
Here is the code I am using >
//putenv("ORACLE_SID=dbone");
putenv("ORACLE_HOME=/u01/oracle/product/9ir2");
$connect=ocilogon("kc_labs", "helpme", "dbone.linux");
$sql = "INSERT INTO KC_CAMPUS.ELECTRONIC_PARTS (PART_NUMBER, PART_CATEGORY, PART_NAME, PART_DESCRIPTION, PART_KIT, PART_LOCATION, PART_COST, PART_PAR) VALUES ('$_POST["PART_NUMBER"]', '$_POST["PART_CATEGORY"]', '$_POST["PART_NAME"]', '$_POST["PART_DESCRIPTION"]', '$_POST["PART_KIT"]', '$_POST["PART_LOCATION"]', $_POST["PART_COST"], $_POST["PART_PAR"]);
$stmt = OCIParse($connect, $sql);
OCIExecute($stmt);
Im using the $_POST["variable"] becuae I am using php 4.3.2 and as I understand, that is how to do it.
Any help is appreciated.