Requires and if statements problems, PLEASE HELP ME :)

From: Date: Fri, 03 Nov 2000 16:39:21 +0000
Subject: Requires and if statements problems, PLEASE HELP ME :)
Groups: php.general 
Request: Send a blank email to php-general+get-23595@lists.php.net to get a copy of this message
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 (#23595) next »