Comunidad PHPeros
Lenguajes => Aplicaciones Pre-Fabricadas => Mensaje iniciado por: Antonio285 en 10 de Febrero de 2008, 20:48:41 pm
-
Hola amigos..
Tengo un error en el pfUsers.. si podeis ayudarme...
al loggearme me dice:
Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/sitio170447/www/config.php:75) in /home/virtual/sitio170447/www/entrar.php on line 23
Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/sitio170447/www/config.php:75) in /home/virtual/sitio170447/www/entrar.php on line 24
Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/sitio170447/www/config.php:75) in /home/virtual/sitio170447/www/entrar.php on line 25
Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/sitio170447/www/config.php:75) in /home/virtual/sitio170447/www/entrar.php on line 28
Gracias..^^
-
como no pongas el codigo
-
<?php
// Registro de usuarios PHPFACIL.NET<br>
// CopyLeft 2005 phpfacil.net // Guillem
// Login.php
// Creado: 20-3-05
include("config.php");
include("functions/index.php");
if($_POST["entrar"]){
if($_POST["username"] && $_POST["password"]){
$contrasena = md5("$_POST[password]");
$query = mysql_query("SELECT * FROM usuarios WHERE nick='$_POST[username]' or email='$_POST[username]'");
$datos = mysql_fetch_array($query);
if($datos[contrasena] == $contrasena){
setcookie("id");
setcookie("nick");
setcookie("contraseña");
if($HTTP_REFERER){
header("Location: $HTTP_REFERER");
} else {
header("Location: index.php");
}
} else {
error(CONTRASENA_INCORRECTA,"1");
}
} else {
error(_CAMPOS,"1");
}
} else {
error(_USO_INDEVIDO,"1");
}
?>
Ahi está..
-
ni idea pero te digo k en
$query = mysql_query("SELECT * FROM usuarios WHERE nick='$_POST[username]' or email='$_POST[username]'");
deberia ser
$query = mysql_query("SELECT * FROM `usuarios` WHERE nick='$_POST[username]' or email='$_POST[username]'");
con 2 `
-
Sigue exando el error..
-
Envias algun tipo de header (Codigo HTML, texto plano, cualquier cosa que no sea PHP, como un echo) antes de la cookie.
Esto se ha hablado 15 millones de veces, usa el campo de busqueda la proxima vez.
Saludos
-
Esque llevo tiempo sin entrar.. si me podriais poner al dia...
-
Mira antonio, lo que quiere decir, esque es tipo setcookie y muchos más, siempre hay que ponerlo antes de ningun código.
-
Esto no va aquí...
Muevo a Prefabricados.