Something veru strange is happening!
I developped a script to protect my site. It uses cookies to keep the login information. The script worked well since then, but NOW it doesn't work anymore!!!
The function SetCookie simply do NOTHING! I have already checked IE6 security for cookies... that's not the problem. Th browser receives cookies. The problem is along PHP!
What I cannot undestand is why it worked so well couple of weeks ago???
Take a look:
<?
//SET COOKIE
if($acao == "logar" AND $login == "BLABLABLA" AND $senha == "BLABLABLA") {
SetCookie("name", "$login:$senha", time()+3600, "/directory", ".domain.com", 0);
}
?>
<head>
<meta name="robots" content="noindex">
<title>BLABLABLA</title>
<link rel="stylesheet" type="text/css" href="includes/estilo.css">
</head>
<body>
<table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" bgcolor="#EFEFEF">
<tr>
<td width="100%">BLABLABLA
</td>
</tr>
</table>
<table border="0" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%">
<p class="general" align="right"><b>Data:</b> <? echo date("F j, Y, g:i a"); ?></p></td>
</tr>
<tr>
<td width="100%">
<?php
if($acao == "logar") {
echo '<p class="general">';
if(!$login) {
echo 'BLABLABLA<br>';
}
if(!$senha) {
echo 'BLABLABLA</p>';
} else {
if($login != "BLABLABLA" OR $senha != "BLABLABLA") {
echo '<p class="general">BLABLA!</p>';
} else {
echo ("<script>window.location='/administracao/index.php'</script>");
exit;
}
}
}
?>
</td>
</tr>
</table>