dbconnect("p328637_hnwp4173","p328637_hn4173","Testdn*4ncA3","10.16.9.16"); } function getConnection(){ static $connection; if(!isset($connection)){ $connection = new DBHandler(); } return $connection; } function dbconnect($dbname="fotos",$user="root",$password="",$server="localhost"){ if (!(mysql_connect($server,$user,$password))){ print "

could not connect to database

\n"; exit; } mysql_select_db($dbname); } function execute_query($query = ""){ global $query_debug; if(empty($query)){ return FALSE; } if(!empty($query_debug)){ print "
$query
\n"; } $result = mysql_query($query) OR die("Query failed".$query); return $result; } } ?>