Inserting a PHP document inside an if else statement

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
h4xx0r
Forum Newbie
Posts: 1
Joined: Sun Apr 28, 2013 9:06 am
Contact:

Inserting a PHP document inside an if else statement

Post by h4xx0r »

I'm working on a login/registration system and I have so far set it up all good.

I am using an if else statement, that on being true, executes this:
echo "Success, you have logged in".

Now I have a 1 page PHP script that I want to put in instead of this message and execute it in a container or something. So when someone logs in, he is able to access the script.

Help me here please.
Thanks.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Inserting a PHP document inside an if else statement

Post by Christopher »

Use include()/require(). See the manual.
(#10850)
Post Reply