codice:
function connessione($hst, $usr, $pwd, $dbase)
{
   $db = mysql_connect($hst, $usr, $pwd);
lo scope è quello della funzione!

codice:
function connessione($hst, $usr, $pwd, $dbase)
{
   $GLOBALS['db'] = mysql_connect($hst, $usr, $pwd);