Skip to content

Instantly share code, notes, and snippets.

@DHS
Forked from jamiefdhurst/error-func.php
Created January 23, 2012 15:06
Show Gist options
  • Save DHS/1663565 to your computer and use it in GitHub Desktop.
Save DHS/1663565 to your computer and use it in GitHub Desktop.
Awesome error function
<?php
function errorpage($message, $cuscon = false, $goBack = true, $exit = true) {
if (!$cuscon) {
echo "
<table width=\"100%\">
<tr>
<td>
<table width=\"100%\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td align=\"center\">
<img src=\"linghead.jpg\" alt=\"Wahh!\" title=\"Wahh!\" /><br /><span class=\"title_red\" style=\"font-size: 36px;\">WAHHH!!!<br />{$message}</span>
" . ($goBack ? "<br /><br /><a href=\"javascript: history.go(-1)\"><span style=\"font-size: 16px; font-weight: bold;\">&lt;-- Go Back</span></a>" : "") . "
</td>
</tr>
</table>
</td>
</tr>
</table>";
} else {
echo $cuscon;
}
if($exit)
exit;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment