Lo realize y no hay caso:
Warning: Cannot modify header information - headers already sent by (output started at /www/docs/sarazeroo.com.ar/public_html/ingresar.php:1) in /www/docs/sarazeroo.com.ar/public_html/ingresar.php on line 13
Warning: Cannot modify header information - headers already sent by (output started at /www/docs/sarazeroo.com.ar/public_html/ingresar.php:1) in /www/docs/sarazeroo.com.ar/public_html/ingresar.php on line 14
Warning: Cannot modify header information - headers already sent by (output started at /www/docs/sarazeroo.com.ar/public_html/ingresar.php:1) in /www/docs/sarazeroo.com.ar/public_html/ingresar.php on line 15
el ingresar.php quedo asi
Código PHP:
<?php
include("mysql.php");
if(trim($HTTP_POST_VARS["user"]) != "" && trim($HTTP_POST_VARS["pass"]) != "")
{
$userN = $HTTP_POST_VARS["user"];
$passN = $HTTP_POST_VARS["pass"];
$result = mysql_query("SELECT pass FROM Datos WHERE user='$userN'");
if($row = mysql_fetch_array($result))
{
if($row["pass"] == $passN)
{
//90 dias dura la cookie
setcookie("ckuser",$userN,time()+7776000);
setcookie("ckpass",$passN,time()+7776000);
header("location:/index.html");
}
else
{
echo "Password incorrecto";
}
}
else
{
echo "Usuario no existente en la base de datos";
}
mysql_free_result($result);
}
else
{
echo "Debe especificar un usuario y password";
}
mysql_close();
?>