I use a trigger error that sends me to an error page with this error, but it works fine if I don't try to use the result set in my page.
If I comment out the trigger error and use a standard connection it ALL works FINE.
Code: Select all
?
$qUserData = GetUser($ID);
$rs = mysql_fetch_array($qUserData);
//echo $rs['UserF'] . " " . $rs['UserS'];
//exit;
?>
<h2>Edit User Shelves for: <?=$rs['UserF']?></h2><br>
This works if I remove the commented out echo and exit.
=============
if(!$link = @mysql_connect($host, $user, $pass))
trigger_error('Can\'t connect to server: ('. $db . ')', E_USER_ERROR);
if(!$database = @mysql_select_db($data, $link))
trigger_error('Can\'t select database on: (' . $db . ')', E_USER_ERROR);
//$link = @mysql_connect($host, $user, $pass);
//$database = @mysql_select_db($data, $link);
If I remove the trigger errors and replace it with the normal connection it all works perfectly. The trigger error should be happening when I connect to the database not when I try to use
<h2>Edit User Shelves for: <?=$rs['UserF']?></h2><br>
This is strange...