require or include??
Posted: Mon Jul 22, 2002 9:26 pm
I have a login.php file that contains the username etc and logs into the database. I have used require_once("login.php") and also include("login.php") in other files. They both work. Which one should I use and when?
Also, how do I go about closing a database connection if I am including (or "requiring") a link to the login.php file? I have tried putting in mysql_close($databasename) in my php files but I just get an error message.
Sorry if this seems like two posts in one, but they are somewhat related.
Thanks
Also, how do I go about closing a database connection if I am including (or "requiring") a link to the login.php file? I have tried putting in mysql_close($databasename) in my php files but I just get an error message.
Sorry if this seems like two posts in one, but they are somewhat related.
Thanks