Ver Mensaje Individual
  #9 (permalink)  
Antiguo 27/03/2007, 16:33
Avatar de Anarninquë
Anarninquë
Colaborador
 
Fecha de Ingreso: julio-2005
Ubicación: MVD | Uruguay
Mensajes: 1.096
Antigüedad: 18 años, 9 meses
Puntos: 28
Re: Login de usuarios

Gracias a ti también cirujano

Pero tanto con el primer código, como con el de el_cirujano, sigo teniendo este problema:

Cita:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/busca/public_html/login.php:1) in /home/busca/public_html/login.php on line 11

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/busca/public_html/login.php:1) in /home/busca/public_html/login.php on line 11

Warning: Cannot modify header information - headers already sent by (output started at /home/busca/public_html/login.php:1) in /home/busca/public_html/login.php on line 15

Evidentemente hay algun problema, pero no entiendo porqué, ya que no hay ningun texto antes del header o la creación de session


Alguna idea?


(este es el código COMPLETO del archivo):

Código:
<?php
include ("config.php");

$nick = $_POST['nick'];
$pass = $_POST['pass'];

$consulta = "SELECT * FROM an_users WHERE nick='$nick'";
$resultado = mysql_query($consulta);
if($datos = mysql_fetch_array($resultado)){
	if($datos['password'] === $pass){
             session_start();
             $_SESSION['autenticado'] = "ok";
             $_SESSION['nick'] = $nick;
             $_SESSION['pass'] = $pass;
             header("location: index.php");
             exit; 	}else{
		header("location: index.php?error_msg=1");
		exit;
	}
}else{
	header("location: index.php?error_msg=2"); 
	exit;
}	
?>

Por favor, espero que alguien pueda ayudarme...


Saludos y gracias a todos
__________________
Marcelo Ferreiro - Desarrollador Web
Mi Web - Pixelar.me