Include Question
| From: | Beauford.2002 | Date: | Thu, 27 Mar 2003 20:47:11 +0000 |
| Subject: | Include Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-141311@lists.php.net to get a copy of this message | ||
Hi,
First, I fixed my other problem of the stack overflow by moving the files
back to the root directory (although I would rather have them in a login
directory). Anyway, I have a question regarding the include function. I have
a login script in a file called login.php - in this file it includes
checklogin.php and loginerrors.php. If the user inputs an incorrect login I
assign $messages the appropriate error from loginerrors, then I re-include
login.php where I want to show the error message, but no matter what I do
the error message will not show up.
Example.
Login.php ....
Enter your Name:
Enter Your Password:
if ($message) { echo $message; }
Checklogin.php
if (!$name || !password) {
$message = $enter_info;
include ("login.php");
exit;
}
Any help is appreciated.