handling error codes
Posted: Fri Jan 09, 2009 4:06 pm
when been doing the coding i notice that when ive tested each function to make sure everything working that when a error is displayed it goes to a blank page and displays it, what i want is one page that i can customise and disaplays the error on that page, here are all my errors
can i replace the above errors with the following code without a problem?
then on the error page have something like
is there any reason why this wouldnt work or is there a simpler way
Code: Select all
else
{ echo "Wrong Confirmation code";}
Code: Select all
die ('Could not connect to the database.');
Code: Select all
// show error page with the error
$reg_error = description of the error here';
include 'error.php';
exit;
Code: Select all
<?php if (isset($login_error)) { ?>
There was an error: <?php echo $login_error; ?>, please try again.
<?php } ?>