function fafaconnect($db_host, $db_user, $db_pass, $db_name) {
@mysql_connect($db_host, $db_user, $db_pass);
@mysql_select_db($db_name);
}
if ($link = @mysql_connect("localhost", "admin", "pass")) {
echo "pass-";
} else {
echo "fail-";
}
if ($select = @mysql_select_db("zushee")) {
echo "pass-";
} else {
echo "fail-";
}
if ($newlink = fafaconnect("localhost", "admin", "pass", "zushee")) {
echo "pass";
} else {
echo "fail";
}
This returns pass-pass-fail. Any ideas?