Jump to content

Archived

This topic is now archived and is closed to further replies.

flynryan692

echo include blah.php help

Recommended Posts

Hello, I'm trying to make it so if they are logged in or out it shows a certian php file...its not working..any ideas? Sorry if this is an easy question..I'm still learning.

 

Here is what I have.

 

<?php

 

if(!session_is_registered('callsign') AND !session_is_registered('password') AND !session_is_registered('email') AND !session_is_registered('name')  ){

 

echo (include 'content/side.php');

 

}

else {

 

echo (include 'content/pilots.php');

 

}

 

?>

Share this post


Link to post
Share on other sites

session_is_registered has been depricated, use the $_SESSION array instead.

Share this post


Link to post
Share on other sites

You dont need to echo your include just:

 

session_start();

if(!$_SESSION['callsign] && !$_SESSION['password'] && !$_SESSION['email'] && !$_SESSION['name'])
{
     include('content/side.php');
}
else
{
     include('content/pilot.php');
}

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.