The interactions in this eCourse require Javascript to be enabled.
Defining Database Connection Properties
previous|next
The hr_cn.inc file defines PHP named constants for three database connection properties:
ORA_CON_UN - set to the hr database user
ORA_CON_PW - set to the hr user password
ORA_CON_DB - set to the database connection identifier string //localhost/XE, which is the default name for the Oracle Database Express Edition installed on the same host as the Apache Web server
The db_connect() function uses ORA_CON_DB for connecting to the target database instance. The username and password constants are assigned as default values for the two parameters of db_connect(), respectively. Therefore, if db_connect() is called without arguments, the default values apply. Otherwise, the supplied parameter values are used.