Bien, te dare una mano...
Imaginate, que este es tu index..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mi website</title>
<body>
</body>
</html>
Ahora le agregaremos el Session start, y le agregamos el include_once, que este evalua el fichero especificado durante la ejecución del script_ Se comporta de manera similar a include(), con la única diferencia que si el código ha sido ya incluido, no se volverá a incluir_
<?
session_start();
session_cache_limiter('nocache,private');
include_once("mc/configtag.php");
include_once("mc/lanzaralerta.php");
include_once("mc/lanzaralertageneral.php");
include_once("mc/colores.php");
include_once("mc/funciones.php");
include_once("mc/language/lang-".$langactual.".php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mi website</title>
<body>
</body>
</html>
Ahora, le incrustamos, nuestro login, a nuestro index
<?
session_start();
session_cache_limiter('nocache,private');
include_once("mc/configtag.php");
include_once("mc/lanzaralerta.php");
include_once("mc/lanzaralertageneral.php");
include_once("mc/colores.php");
include_once("mc/funciones.php");
include_once("mc/language/lang-".$langactual.".php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mi website</title>
<body>
<div align="left"><span class="Estilo8"></span>
<?php
if (isset($_SESSION['nnick'])) {
?>
</span>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="119" valign="top"><table width="208" height="129" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="68" height="129" valign="top"><span class="Estilo5"><img src="http://www.habbo.es/habbo-imaging/avatarimage?user=<?php echo $habboname; ?>&action=wav&direction=3&head_direction=3&img_format=gif&gesture=sml" width="64" height="110"></span></td>
<td width="140" valign="top"><table width="132" height="105" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="ftag.php" class="Estilo20">Minichat</a></td>
</tr>
<tr>
<td><a href="upanel.php?<? echo session_name()."=".session_id() ?>" target="_blank" class="Estilo20">Panel MC</a></td>
</tr>
<tr>
<td height="32"><a href="logout2.php" class="Estilo20">Desconectarse</a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<span class="Estilo5">
<?php
} else {?>
</span>
<table width="187" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
</tr>
</table>
<span class="Estilo5"></span>
<form action="procesar2.php?<? echo session_name()."=".session_id() ?>" method="post" name="tag" id="tag" onSubmit="return enviado()">
<div align="left"><span class="Estilo17">
<?
include ("main.php");
if ($_GET['mostrar'] == "tag.php") {
?>
<?
if (isset($_SESSION['nnick'])) {
echo _WELLCOME." <b>".$_SESSION['nnick']."";
echo "</b> <a href=\"logout.php\" class=\"EnlaceMenu\">"._LOGOUT."</a> ";
if (isset($_SESSION['nnick'])){
$nick = $_SESSION['nnick'];
}
else if (isset($_POST['nick'])) {
echo "</b> <a href=\"logout.php\" class=\"EnlaceMenu\">"._LOGOUT."</a> ";
}
} else {
if ($activarReg == "on")
$size = "17";
else
$size = "30";
if (!isset($_GET['n']) || $_GET['n'] == "")
$nick =_NICKNAME;
else
$nick = $_GET['n'];
?>
<? } ?>
<? if ($activarReg == "on") { ?>
<? } ?>
<br>
</span>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="Estilo20">Nick:</td>
</tr>
<tr>
<td align="center"><span class="Estilo17">
<input name="nick" class="lithiumboton" id="nick" style="text-align:center" onFocus="this.value=(this.value=='<?=$nick; ?>') ? '' : this.value;"
onBlur="this.value=(this.value=='') ? '<?=$nick; ?>' : this.value;" value="<?=$nick; ?>" size="19" maxlength="<? echo $maxNick; ?>" />
</span></td>
</tr>
<tr>
<td align="center"><span class="Estilo20">Contraseña:</span></td>
</tr>
<tr>
<td align="center"><span class="Estilo17"><strong>
<input name="clave" type="password" class="lithiumboton" id="clave" style="text-align:center" onFocus="this.value=(this.value=='<?=_PASSWORD; ?>') ? '' : this.value;"
onBlur="this.value=(this.value=='') ? '<?=_PASSWORD; ?>' : this.value;" value="<?=_PASSWORD; ?>" size="19" maxlength="10" />
</strong></span></td>
</tr>
<tr>
<td height="31" align="center"><input name="enviar" type="submit" class="lithiumboton" id="enviar" value="Entrar"></td>
</tr>
</table>
<a href="catalogo/index.php" class="Estilo20">Registrate..</a>
<?
} else {
?>
<? include($_GET['mostrar']); ?>
<?php
if (isset($_SESSION['nnick'])) {
} else {
?>
<?php
}
if (isset($_SESSION['nnick'])) {
} else {
}
?>
<? } ?>
</div>
</form>
<? } ?>
</div>
<table width="212" border="0" cellspacing="0" cellpadding="0">
</table>
</td>
</tr>
</body>
</html>
<? } ?>
<? } ?>
Asi, de sencillo, es , entiendes??