i am trying to run this php code to insert values in oracle database but error showing when run it. my code is:
<?php
$c = oci_connect('system', 'passward', 'dbname');
$sql = "INSERT INTO EMPLOYEES(EMP_ID,JOB_ID) VALUES (:emp_id, ".'{$nw}'.")";
$compiled = oci_parse($c, $sql);
oci_bind_by_name($compiled, ':emp_id', $eid);
oci_bind_by_name($compiled, '.$nw.', $nw);
oci_execute($compiled);
?>
and i get the folloing errors
Warning: oci_bind_by_name(): ORA-01036: illegal variable name/number in C:\xampp\htdocs\folder\add_emp.php on line 16
Warning: oci_execute(): ORA-00911: invalid character in C:\xampp\htdocs\folder\add_emp.php on line 17
Ι know the problem is where Ι write $nw, but just don't know the right syntax or way.