Re: Requires and if statements problems, PLEASE HELP ME :)

From: Date: Fri, 03 Nov 2000 17:44:11 +0000
Subject: Re: Requires and if statements problems, PLEASE HELP ME :)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-23596@lists.php.net to get a copy of this message
You are starting an if condition in one file and ending it in another? Or am I reading this wrong? If you are, don't. -Rasmus On Fri, 3 Nov 2000, Ade Smith wrote: > Hi guys > > I have just moved my site to a new hosting company who are running PHP4 > where my old host was running PHP3 and i am having a strange problem, Here > it is: > > I am calling a php file which will detects & will show a no login message if > it doens't detect a cookie to prove they are logged in like so, else it will > move on to the else: statement. > > ----login_detect.php3---- > <? > if( !$cookie_variable ): > > require("top.php3"); > echo"NO LOGIN"; > require("bottom.php3"); > else: > ?> > > > Then i call this file here in the main page like so, the remainder of this > page becomes the else: statement. > > ----main_page.php3---- > <? > require("login_detect.php3"); > > require("top.php3"); > echo"MAIN PAGE TEXT"; > require("bottom.php3"); > > endif; > ?> > > However when i do this I get a parse error in the login_detect.php3 on the > last line, this works in PHP3 can any one suggest whats wrong ? or had > similar problems ? as I am running out of ideas. > > Ade > ------------------------------------- > ade@stormbreaker.com > ------------------------------------- > >

« previous php.general (#23596) next »