I'm trying to include file from other server. It works but the function in that file would not work.
It gives me this error:
Fatal error: Call to undefined function: db_connect() in /home/desig181/public_html/store/temp3.php on line 13
This is the source code of a included file:
<?
function db_connect() {
global $db_host;
global $db_user;
global $db_pass;
global $db_name;
$id_link=@mysql_connect($db_host, $db_user, $db_pass);
if (!$id_link) {
syslog(LOG_ERR, getenv("HTTP_HOST").": db_connect(): can't connect to the host \"{$db_host}\"");
}
if (!mysql_select_db($db_name, $id_link)) {
//syslog(LOG_ERR, getenv("HTTP_HOST").": db_connect(): can't connect to database \"{$db_name}\" on \"{$db_host}\": ".mysql_error($id_link));
mysql_close($id_link);
}
return($id_link);
}
?>