using Session variables to log into Oracle ?
| From: | Paul Fernandez | Date: | Mon, 19 Jun 2000 23:11:10 +0000 |
| Subject: | using Session variables to log into Oracle ? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-500@lists.php.net to get a copy of this message | ||
I am using PHP4's session management to hold a user's username & password to log into
Oracle.
There is a conditional destructor to end all session variables in case of error. But when this
error happens, the variables are not going away.
<?
session_start();
session_register('username');
session_register('password');
session_register('db');
$connection = OCILogon($username,$password,$db);
if ($connection == false){
echo "login failed.<br>";
echo 'now destroying session.';
session_destroy();
exit;
}
OCILogoff ($connection);
?>
Is this incorrect?