GH wrote:
Hi...

Sorry about the last post... did not realize i hit the wrong button

Here is my question. Sorry if it is a basic answer... new to php

I have PHP/mySQL and would like to know how i can set use an external
file to prevent myself for having to code everytime the
"connection/login" to mysql.

----------------

I was thinking of making an external file but was not sure if it
should have just variables or should it have more?

The usual way to solve it is to have a config file (can be php, ini file or some other format). Then you have some main php script that is included at the top of every php script. Main script reads the config file, makes connection to db, starts session, includes other files that are necessery etc.



also, does the content of the external file need to be enclosed in <?PHP & ?>'s

Yes, it's in the manual, read it.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to