Mi problema esta en que al principio de una pagina tengo esto:
Código PHP:
<?php
session_start();
require("../requis/requi.php");
if(!isset($_SESSION["nk_usu"]) and !isset($_SESSION["nk_pass"]))
{
$usuariologin="noexiste";
if(isset($_POST["usuario"]) and isset($_POST["password"]))
{
$nick=$_POST["usuario"];
$pass=$_POST["password"];
$pass=md5($pass);
$sql="Select * from usuarios where nick='$nick' and pass='$pass'";
$resul=mysql_query($sql);
$tema= mysql_fetch_array($resul);
$varilog="siexiste";
if ($tema["nick"]==$nick and $tema["pass"]==$pass )
{
$_SESSION["nk_usu"]=$nick;
$_SESSION["nk_pass"]=$pass;
header ("location: ./panel.php");
$usuexist="siexiste";
}
else
{
$usuexist="noexiste";
}
}
else
{
$varilog="noexiste";
}
}
else
{
$usuariologin="siexiste";
}
?>
Código PHP:
<?php
if ( $usuariologin == "noexiste" )
{
if ( $varilog == "noexiste" )
{
echo "<td valign=\"top\"><b>Tienes que iniciar sesión</b></td>";
}
else
{
if( $usuexist == "noexiste" )
{
echo "<td>El usuario o contraseña es incorrecta </td>";
}
}
}
else
{
?>
<td>
<a href=""><img src="http://www.forosdelweb.com/f18/iconos/sobre.gif" border="0" width="60" height="50"></a>
</td>
<td>
<a href=""><img src="http://www.forosdelweb.com/f18/iconos/mdat.png" border="0" width="60" height="50"></a>
</td>
<td>
<a href=""><img src="http://www.forosdelweb.com/f18/iconos/adfo.png" border="0" width="50" height="50"></a>
</td>
<tr align="center" bgcolor="#0000FF">
<td>
<a href="">Buzón</a>
</td>
<td>
<a href="">Cambiar Clave</a>
</td>
<td>
<a href="">Ver Suscripciones</a>
</td>
</tr>
<?php
}
?>
if(isset($_POST["usuario"]) and isset($_POST["password"]))
{