autenticacion
| From: | Johnny Sanchez | Date: | Mon, 06 Feb 2006 18:36:34 +0000 |
| Subject: | autenticacion | ||
| Groups: | php.general.es | ||
| Request: | Send a blank email to general-es+get-57704@lists.php.net to get a copy of this message | ||
hola foro, tengo un sistema de autenticacion y me esta dando este error, aqui les pongo el codigo, y
el error.
CODIGO:
session_start();
if ( $usuario && $contraseña )
{
$db_conn = mysql_connect( "localhost", "root", "root" );
mysql_select_db( "cong", $db_conn );
$query = "SELECT * FROM auten "
."WHERE usser='$usuario' "
."AND passwd='$contraseña'";
$result = mysql_query( $query, $db_conn );
if ( mysql_num_rows( $result ) > 0 )
{
$valid_user = $contraseña;
session_register( "valid_user" );
}
}
?>
ERROR:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent
by (output started at C:\www\cong\adm\auth.php:2) in C:\www\cong\adm\auth.php on line 6
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers
already sent (output started at C:\www\cong\adm\auth.php:2) in C:\www\cong\adm\auth.php on line 6
Les agradecere cualquier ayuda que me puedan ofrecer.
Johnny