I was just wondering what the "right way" to do the MySQL connection thing
is. Am I supposed to do it everytime through in the php code, should I make
it a session variable, or is a global variable the way to go? Right now this
is the code that I have

if (empty($_SESSION['db']))
   $_SESSION['db'] = mysql_connect("localhost", "root");


Is that a "good" way to do it or is there a "better" way or anything like
that. Thanks,

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

Reply via email to