I am trying to setup a connection to my sql database based off the example below.
// ----------------------
// Retrieve some private information like my db password
include("db_info.php");
// ----------------------
// Connect to Oracle database
$conn = oci_connect('username', $db_pwd, '(DESCRIPT...
My question is, how do I handle the db_info.php file? I have my password stored in there as
$db_pwd = "something"
*Edit – The error I get when trying to open my page is as follows.
Array ( [code] => 24415 [message] => ORA-24415: Missing or null username. [offset] => 0 [sqltext] => )
Make sure your username is correct. If it’s a variable in
db_info.php, the code below is wrong:if it’s a variable it should be:
Also, are you sure you’re using an Oracle database? (Sorry, had to ask) 🙂
EDIT:
Looking at this again, it looks like you have a simple typo. Try this:
You had an extra
.in there.