bobrivers2003
Technical User
I use the following to connect to a mysql database:
mysql_connect("localhost", "user", "password") or die(mysql_error());
mysql_select_db("database") or die(mysql_error());
The trouble is I have about 20 pages that connect to the server and changing any details will be a pain the the arse.
Is there a function in php to include text from a separate file that would for example have the connection settings so I would only have to change one file and not 20?
mysql_connect("localhost", "user", "password") or die(mysql_error());
mysql_select_db("database") or die(mysql_error());
The trouble is I have about 20 pages that connect to the server and changing any details will be a pain the the arse.
Is there a function in php to include text from a separate file that would for example have the connection settings so I would only have to change one file and not 20?