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
else
{ echo "Wrong Confirmation code";}
die ('Could not connect to the database.');
can i replace the above errors with the following code without a problem?
// show error page with the error
$reg_error = description of the error here';
include 'error.php';
exit;
then on the error page have something like
<?php if (isset($login_error)) { ?>
There was an error: <?php echo $login_error; ?>, please try again.
<?php } ?>
is there any reason why this wouldnt work or is there a simpler way