thanks!!
Tell me, is it a good idea to have the following code? this is inside an included file, which is in everypage because it has the logo, and the main menu which sould always appear. So, do you think it's a good idea to redirect with javascript? I tried to use the header() function but I found 2 problems, one error says that I can't send header twice, I fixed it moving the header function at the top, that error dissapear but it didn't redirect me to the login page, it showed me the content of the login page but beneath it also showed me content of the other page, the page I was trying to access skipping the login page.
So let me know please what do u think about it 🙂 thanks
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Test</title>
<?php
if(strlen($HTTP_SESSION_VARS['usunom'])==0)
{
?>
<SCRIPT LANGUAGE="JavaScript">
<!--
window.location="http://www.mypage.com/main"
// -->
</script>
<?php
}
?>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<td width="100%"> <table width="100%" border="0">
<tr>
<td width="70%" rowspan="2"><img src="http://www.mypage.com/main/images/logo.png">(beta) </td>
<td align="right">Mensajes | Chat </td>
</tr>
<tr>
<td width="30%" align="right">Cuenta y Privacidad | Ayuda | Cerrar Sesión </td>
</tr>
</table></td></tr>
</table>