This is the kind of thing I have so far, I really have no idea how I could make this go away:
Code: Select all
<?php include '******.php';
require_once('/home/********.php');
ob_start();
$test = 'tets';
include '**********.php';
try
{
$sql = "SELECT 1, 2 FROM table WHERE column = :id";
$ps = $shn_conf->prepare($sql);
$ps->execute(array(':id'=>$test));
}
catch(PDOException $e)
{
error_log($e);
error_msg();
}
echo "completed script!";
ob_flush();error_msg()
Code: Select all
function error_msg()
{
ob_end_flush();
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta name="ROBOTS" content="NOINDEX, FOLLOW" />
<title>Database Error</title>
<link href="http://*********/css/database.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main">
<div id="formheader"><h2>Database Error</h2></div>
<div id="formbody">
<table align="center">
<tr><td colspan="2">The server encountered a database error and was unable to complete your request, please reload this page in a few seconds. <br /><br />If the error persists contact the <a href="MAILTO:<?php echo $_SERVER['SERVER_ADMIN'] ?>">server administrator</a> and inform them of the time the error occurred, as well as anything you might have done that may have caused the error.
<br /><br />More information is available in the server error log.</td></tr>
</table>
</form>
</div>
</div>
</body>
</html>
<?php
ob_flush();
exit;
}