-1

Hey I'm wanting to retrieve some data from the a database. But it seems whenever I enter my credentials into the SQL database to retrieve the data I get the following error:

2
  • 1
    At the very least, you could identify which line is 39. Commented Oct 5, 2014 at 12:56
  • 1
    Where is $connect?? Why using md5? Commented Oct 5, 2014 at 13:01

1 Answer 1

1

Since i presume this is a similar use case as your last question

Your php file is missing the configuration of the connection:

<?php
$dbuser = "******"; 
$dbpass = "*******"; 
$db = "SSID";
$connect = OCILogon($dbuser, $dbpass, $db);



if (!$connect) {
echo "An error occurred connecting to the database";
exit;
}

So it knows which connection you are using and passing to the checkUserPass() function.

UPDATE:

For the table name you need to pass $dbtable as you can see in the function declaration

function checkUserPass($connect,$username, $password, $dbtable)

so either set a $dbtable variable before calling the function:

$dbtable="register_table";

or send it immediately as a string:

function checkUserPass($connect,$username, $password, "register_table")

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

3 Comments

ok thanks again for that. I'm still having some errors but I think you've put me on the right track.
I know this isn't you job and its okay if you CBF. But I'm getting the errors: ociexecute() ORA-00903: invalid table name on line 37 where there seems to be no code on that line? Also i'm getting one other error of: ocifetch() ORA-24374: define not done before fetch or execute and fetch on line 39 :/
I updated the question to address this but i suggest you read some beginner tutorials on PHP/MySQL before moving on with development.

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.