Jump to content

[SOLVED] what fi statement need help


runnerjp

Recommended Posts

 

hey guys, ok i got this scipt puts the content on my page... i have added this to the body.php ( all will become clear in a min)

if (file_exists($content)) {
include($content);
} else {?>

 

 

 

 

 

so how would i add

$content=
to

 

 

if($auth[error]) { include("include/index.inc.php"); } 
            else { include("include/index.log.php"); }

 

some how to show the different pages as content?

 

here is my index file if it will help

 

<?
// File ID: index.php (main page for profile site)


include("require/config.php");
require("require/authmember.php");

$auth=authenticate($login, $password);
include("include/get_config.inc.php");
[color=red]$content=if($auth[error]) { include("include/index.inc.php"); }
            else { include("include/index.log.php"); }[/color] 
if ($auth[error]) {$menu="include/menu_u.inc.php";} else {$menu="include/menu_v.inc.php";}

include("include/header.inc.php");
include("include/body.inc.php");
//include("include/footer.inc.php");
?>

Link to comment
https://forums.phpfreaks.com/topic/41789-solved-what-fi-statement-need-help/
Share on other sites

ok that works but it repeats it 2wise www.runnerselite.com

 

<?
// File ID: index.php (main page for profile site)


include("require/config.php");
require("require/authmember.php");

$auth=authenticate($login, $password);
include("include/get_config.inc.php");

$content = ($auth[error]) ?  "include/index.inc.php" : "include/index.log.php";

include $content;

if ($auth[error]) {$menu="include/menu_u.inc.php";} else {$menu="include/menu_v.inc.php";}

include("include/header.inc.php");
include("include/body.inc.php");
//include("include/footer.inc.php");
?>

 

here is body

 

<table width="100%" summary="body">
  <tr>
    <td width="15%" height="96" align="left" valign="top"><center>
        <?include("include/info.inc.php"); ?>
      </center>
      <?include("$menu");?></td>
    <td width="1%" align="left" valign="top" bgcolor="#FFFFFF"><div id="linedown"> <img src="http://www.runnerselite.com/images/linedown.jpg" alt="linedown" />       
      </div></td>
    <td width="84%" align="left" valign="top"><?
if (file_exists($content)) {
include($content);
} else {?>
      <?echo $content;?>
      </p>
      <?} ?>
    </td>
  </tr>
</table>

Archived

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

×
×
  • 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.