Hi,
since a few months i started adding php codes almost everywhere INSIDE of the templates in VB (i use a hack that allows php code in templates since i don't know **** about plugins/products/hooks)
But i added a LOT of queries everywhere... and since i'm not familiar with vb variables i add my own queries and connections to the database.... I'm starting to think this could be a security hole if i ever have a mod who has access to the templates editing...
I have codes like this on a lot of pages:
Quote:
$server = "localhost";
$user = "me";
$password = "my_pass";
$database = "my_db";
mysql_connect($server, $user, $password) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());
|
could anyone suggest me an example code that uses VB variables and would allow me to not have to add my db's username and password every time?
thanks!