I'm trying to connect to a database online from a local website, but I got the first error 'connessione fallita'. It isn't a problem of configuration because if I try to use the same code online (it is an inc file) it works! How can i fix it?
<?php $connessione=@mysql_connect('ip','username','password');
if (!$connessione){
echo('connessione fallita');
exit();
}
if (!@mysql_select_db('nameofthetable')){
exit('la selezione database non ha funzionato');
}
?>
Obviously I changed the values of 'ip', 'username', 'password', and table here for security reasons.