Jump to content

Fatal error: Call to undefined function MySQLError()


caryhartline

Recommended Posts

I have looked all over the Internet for the answer so please critizise on something that is probably dumb.  I have this code for the header on my website and it recently started saying:

 

Fatal error: Call to undefined function MySQLError() in /hermes/bosweb/web272/b2720/ipg.caryhartline/themes/default/header.php.html on line 11

 

This doesn't happen on every page.  It only happens when someone logs into their account.  Please help! This is the code:

 

<?
header( 'Content-type: text/html; charset=\"charset=utf-8\"' );
//iso-8859-1
?>
<?
  // get balance information  
  $query = "select * from BPLA_users where nick='".$_SESSION['BPLowbidAuction_LOGGED_IN_USERNAME']."'";
  $result = @mysql_query($query);
  $TPL_balance = "00.00";
  if(!$result) {
      MySQLError($query);
      exit;
  } else {
      $USER = mysql_fetch_array($result);
      $TPL_balance 	= number_format($USER['balance'], 2, '.', '');
  }
  $is_pre_registration = (isset($_REQUEST['pre_registration']) && ($_REQUEST['pre_registration'] == "1")) ? "1" : "";
#// Build the page width string
//$PAGEWIDTH = $SETTINGS['pagewidth'];
//if($SETTINGS['pagewidthtype'] == 'perc') $PAGEWIDTH .= "%";
$PAGEWIDTH = "100%";
if ($HTTPS == '1' || $HTTPS == 'on') {
  $SITEURL = $Https['httpsurl'];
  $SETTINGS['siteurl'] = $Https['httpsurl'];
} else {
  $SITEURL = $SETTINGS['siteurl'];
  $SETTINGS['siteurl'] = $SETTINGS['siteurl'];
}
?>

Link to comment
Share on other sites

I think you are talking about this code.

<?
if(!defined('INCLUDED')) exit("Access denied");
if(!function_exists(MySQLError))
{
Function MySQLError($Q)
{
	global 	$SESSION_NAME,
			$SESSION_ERROR,
			$ERR_0001;

	$SESSION_ERROR = $ERR_001."<br>".$Q."<br>".mysql_error();		
	$_SESSION["SESSION_ERROR"]=$SESSION_ERROR;
	print "<SCRIPT LANGUAGE=Javascript>document.location.href='error.php'</SCRIPT>";

	return;
}
}
?>

This is from a file called error.inc.php.  I think it is included because the file error.php includes this code and requires header.php which includes the file header.php.html that I originally posted.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.