PHP Version 5.4.42
oci8 Version 1.4.9
Oracle Client Version 11.2.0.1.0
------------------------------------------------------------------------------
I'm attempting to write a logon page which connects Oracle users and then redirects to another PHP file where the data is displayed etc. I do not want to hard code $username, $password or $database in any PHP file. I can pass $username, $password and $database to the second php, but this forces a second connection which I'm also trying to avoid. My connect code looks like this: ( Yes I will switch to oci_connect as I move forward )
$conn = ocilogon($username, $password, $database);
if (!$conn) {
$e = ocierror();
print htmlentities($e['message']);
exit;
}
If I try to pass $conn I get an error stating something to the effect that $conn is a resource. I searched several of the link provided here and came up empty.
My two questions:
1. Can I pass an Oracle connection between PHP files?
2. If yes to question 1 can anybody direct me to an example or document?
Thanks!
P.S. Have also read everything I can find here:
PHP: oci_connect - Manual