Need some directions with this question please:
in login.php we have:
// Assign $data to $errors for login_page.inc.php: $errors = $data;
and in login_page.inc.php we have:
// Print any error messages , if they exist: if (isset($errors) && !empty($errors)) { echo '<h1>Error!</h1> <p class="error">The following error(s) occurred:<br />'; foreach ($errors as $msg) { echo " - $msg<br />\n"; } // End of foreach. echo '<\p><p>Please try again.</p>'; // First closing <\p> tag displays in browser or error! } // End of errors IF.
btw: I get '</p>' displayed on screen with this code along with errors (script 12#1).
I need some direction on whether to change login.php to handle each error, to edit login_page_inc.php or both?
I tried editing login_page_inc.php but the errors (if there are any) clear too quickly and the redirect script sends me to the home page. I will continue the book but would like to come back and address this.