Re: Help Needed

From: Date: Tue, 04 Feb 2003 17:32:29 +0000
Subject: Re: Help Needed
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134300@lists.php.net to get a copy of this message
Pushpinder Singh Garcha schrieb: > Hello All: > > My question is related to authentication. I have made a login system > using PHP Sessions and MySQL. Once the user gets authenticated on the > website I want to be able to allow him to see some html pages on the > website. Only users who have logged in are able to see such a files. I > have asked this question before , but still I have some doubts. > > My code will check for: > > > if (session_is_registered($valid_user)) > { > /// display the reqd page > } > > > else { > > DISPLAY ERROR MESSAGE and ASK USER TO LOGIN > } > > > How should I display the page ... the page has a lot of html code and > trying to write echo " blah blah blah ..... "; > will not be a an option. Please suggest a way out . you could include every page into a php script using <?php include('index.htm'); ?> this mean, that this page is like being copyed in the php file also instead of <?php echo "bla bla bla": ?> you always can do <?php ... ?> bla bla bla <?php ... ?> -- @ Goetz Lohmann, Germany | Web-Developer & Sys-Admin \/ ------------------------------------------------------ () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation.

« previous php.general (#134300) next »