1

My PHP code is here:

<?php        
    $conn = oci_connect('user', 'test', 'localhost/db');              
    if (!$conn) {
        $e = oci_error();           
        }
    else
    {
     $st_en=oci_parse($conn, " begin :r:=admin.encrypt_password('$row_pd[0]');end; ");
     ociexecute($st_en);
      while (($row_en=oci_fetch_row($st_en))!=false)//checking 
        {
             if ( $pword==$row_en[0])//password matching
            {
                      echo "success";
            }
            else
            {
              echo "sorryyyyyyyyyy";
            }                   
        }
        oci_free_statement($stid); 

        oci_close($conn);//connection close
    }        
    ?>

when I execute this code I getting this error:

error code ora01008 occurred, not all variables bound

1 Answer 1

1

You should use oci_bind_by_name() to bind your variable r with some actual php variable.

1
  • A good tutorial that should explain how you can bind variable for return value PHP call Oracle function.. You should define variable say $returnValue and then call ` oci_bind_by_name($st_en,":r",$returnValue);` after oci_parse and before ociexecute Jun 17, 2014 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.