Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Use the updated code and make a try: </p> <pre><code>&lt;?php $ora_conn = oci_connect('system','oracle','//localhost/XE'); if(!$ora_conn) { $m = oci_error(); echo $m['message'], "\n"; exit; } else { //print "You are connected to the database!&lt;br/&gt;"; } if (isset($_POST['Submit'])) { $optid = $_POST['operator_id']; $optdec = $_POST['operater_description']; $empid = $_POST['employee_id']; $empmail = $_POST['employee_emailid']; $query = "SELECT * FROM optr_add WHERE OPERATOR_ID= '".$_POST['operator_id']."' OR employee_emailid = '".$_POST['employee_emailid']."' OR employee_id = '".$_POST['employee_id']."'"; $s=oci_parse($ora_conn, $query); oci_execute ($s,OCI_DEFAULT); $objResult = oci_fetch_array($s); if($objResult) { echo "&lt;script&gt;alert('Operator ID already exist')&lt;/script&gt;"; } else { $query = 'INSERT INTO optr_add (operator_id , operater_description ,employee_id,employee_emailid)**&lt;&lt;---here** VALUES (:operator_id ,:operater_description,:employee_id,:employee_emailid)'; $s=oci_parse($ora_conn, $query); oci_bind_by_name($s, ':operator_id', $optid ); oci_bind_by_name($s, ':operater_description', $optdec); oci_bind_by_name($s, ':employee_id', $empid); oci_bind_by_name($s, 'employee_emailid', $empmail ); if (isset($_POST['Submit'])) $objExecute=oci_execute($s); if (isset($_POST['Submit'])) { if (!isset($optid) || empty($optid)) { //header( "refresh:1110;url=Define_Organization.php" ); echo"&lt;script&gt;alert('Submit Successfully')&lt;/script&gt;"; exit(); echo"&lt;script&gt;alert('Please enter your data')&lt;/script&gt;"; exit(); } } oci_free_statement($s); oci_close($ora_conn); } } ?&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload