Hi Iggy, > I mean the difference between having that code on > every page or calling it from an external page > doesn't tell me if it is realy necessary to do it > all the time.
Yes, you do have to connect to the database in every script that needs to access it. Usually this is done at the start of the script, along with any calls to session_start() and other "global" stuff. For convenience and ease of maintenance, however, it makes good sense to write a separate file that does nothing but connect to the database. This separate file then needs to be attached to the running script via include(), at any point before the first call to the database. HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

