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.

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.