note 89668 deleted from function.die by danbrown
| From: | danbrown@php.net | Date: | Wed, 18 Mar 2009 15:59:16 +0000 |
| Subject: | note 89668 deleted from function.die by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-152099@lists.php.net to get a copy of this message | ||
Note Submitter: houston_roadrunner at yahoo dot com
----
<?php
// error array
$err_logger = array();
$page = "<html>";
$page.= "<head>";
$page.= "</head>";
$page.= "<body>";
// page data pre error
$page.= "fore<br />";
// this will make an error
$sql = "SELECT * FROM table";
$rs = mysql_query($sql) or array_push($err_logger,mysql_error());
// page data post error
$page.= "<br />aft";
$cnt = count($err_logger);
if($cnt>0)
{
// handle error conditions here, send to an error
// log if you do not want error sent to the page
$page.= "<br />Error messages logged<br />";
$page.= "=====================<br />";
for($i = 0; $i < $cnt; $i++)
{
$page.= $err_logger[$i]."<br />";
}
}
$page.= "</body>";
$page.= "</html>";
print $page;
?>