Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/06/2011, 20:17
Avatar de geeck22
geeck22
 
Fecha de Ingreso: agosto-2010
Ubicación: Tijuana B.C.
Mensajes: 79
Antigüedad: 13 años, 8 meses
Puntos: 7
Exclamación Error con Session y Mysql

Saludos a todos!
tengo un problema con mi codigo para auntentificarse que me funciona en mi wampserv pero en mi hosting no D: me da este codigo de error:

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

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

Warning: Cannot modify header information - headers already sent by (output started at /home/cherryst/public_html/sesion.php:1) in /home/cherryst/public_html/sesion.php on line 18
y mi codigo para autentificar es:
Código PHP:
<?php
session_start
();
include(
'conexion-bd.php');
$usuario $_POST['us'];
$password $_POST['pw'];
$pass md5($password);
$url $_POST['url'];

$resultado mysql_query("select usuario from usuarios where usuario = '$usuario' and contrasena = '$pass'");
$filas mysql_num_rows($resultado);

if(
$filas==1) {
$_SESSION['conectado']="OK";
$_SESSION['us'] = $_POST['us'];
$_SESSION['pw'] = $pass;
header("Location: $url");
} else {
header("Location: login-error");
}
?>
hay alguien que vea mi error?
espero que me puedan ayudar, gracias