Just a typo, but now I have other problems as well which I think have to do
with paths and includes.  If I am in the root directory on page main.html
and click on a link that is in /other - because this is a restricted page I
include main.html with an error (which right now doesn't display) - but now
the paths are all screwed up. If I click on the same link again I get file
not found. Hope I am explaining this right as this is really getting on my
nerves.

TIA

----- Original Message -----
From: "James E Hicks III" <[EMAIL PROTECTED]>
To: "Beauford.2002" <[EMAIL PROTECTED]>
Sent: Thursday, March 27, 2003 4:15 PM
Subject: RE: [PHP] Include Question


> If checklogin.php is only below, you shouldnn't get those errors. Anyway,
> is password just a typo below or does your code omit the $ too?
>
>
> if (!$name || !password) {
>      $message = $enter_info;
>      include ("login.php");
>      exit;
> }
>
> -----Original Message-----
> From: Beauford.2002 [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 27, 2003 4:07 PM
> To: James E Hicks III
> Subject: Re: [PHP] Include Question
>
>
> Because I would get the error - headers already sent etc.
>
> ----- Original Message -----
> From: "James E Hicks III" <[EMAIL PROTECTED]>
> To: "Beauford.2002" <[EMAIL PROTECTED]>
> Sent: Thursday, March 27, 2003 3:53 PM
> Subject: RE: [PHP] Include Question
>
>
> > Why not try header("login.php") instead of include?
> >
> > James Hicks
> >
> >
> > -----Original Message-----
> > From: Beauford.2002 [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 27, 2003 3:47 PM
> > To: PHP General
> > Subject: [PHP] Include Question
> >
> >
> > 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.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to