Using include() to specify mysql_connection??
| From: | Boclair | Date: | Sat, 17 Feb 2001 01:53:47 +0000 |
| Subject: | Using include() to specify mysql_connection?? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-6707@lists.php.net to get a copy of this message | ||
Is it possible to place the mysql_connect and mysql_select_db functions in an include file and to
open the connection and use the database in a PHP file using include(); ?
All that happens when I attempt it is that the text of the include file is dumped, the connection to
the mysql server is not opened and the variables are not created.
Is there some other way of achieving this? I have the databases transferred to another host but
transferring the php files requires the mysql_connect and mysql_select_db amended for each.
Tim Morris