unable to login to oracle database using php.
| From: | babu | Date: | Wed, 15 Jun 2005 12:02:38 +0000 |
| Subject: | unable to login to oracle database using php. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-39678@lists.php.net to get a copy of this message | ||
Hi,
I have a small problem.
I am trying to connect to oracle using php.i get strange results.please see the code below.
code:
function check_database($login,$password) {
global $db;
echo"checking authentication <br>";
$conn = ocilogon($login,$password,$db);
echo "$conn";
if (!$conn) {
echo("Error during ocilogon");
echo "<p>";
printLastError();
echo "</p>";
return;
}
echo" <br> after authentication";
}
if(isset($checkpass)) {
if(check_database($login, $password)) {
echo "<h2>Login Success!</h2>";
} else {
echo "<h2>Login Failed</h2><p>Bad username or password.Try again:";
}
}
in the above code for checking the authentication of login , there is some value assigned to
$conn,"Resource id #5 ". and also if(!$conn)is not executed but after the funtion exit,
the else statement (echo "<h2>Login Failed</h2>) is executed.
can anyone tell me where the problem is.
---------------------------------
How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos. Get
Yahoo! Photos