Quote:
Originally Posted by Sabolin You don't even have to bother with a class or function. If you just put:
into the opendb.php, when you call require_once("opendb.php") it will open the connection. Turns 6 lines of code in your example into 2.
Now if you're going to be opening multiple concurrent connections to the same db for whatever reason, then your method is fine. |
the simple method is fine, but it fucks up when someone calls foo.php?user=;DELETE FROM blah;