al loguearme en mi web salta esto
he mirado mdonde esta el falllo y es aqui:Warning: Cannot modify header information - headers already sent by (output started at /home/www/henow.onlinewebshop.net/config.php:11) in /home/www/henow.onlinewebshop.net/entrar.php on line 17
Warning: Cannot modify header information - headers already sent by (output started at /home/www/henow.onlinewebshop.net/config.php:11) in /home/www/henow.onlinewebshop.net/entrar.php on line 18
Warning: Cannot modify header information - headers already sent by (output started at /home/www/henow.onlinewebshop.net/config.php:11) in /home/www/henow.onlinewebshop.net/entrar.php on line 19
Warning: Cannot modify header information - headers already sent by (output started at /home/www/henow.onlinewebshop.net/config.php:11) in /home/www/henow.onlinewebshop.net/entrar.php on line 20
<?
require 'config.php' ;
if($_POST[enviar]) {
function quitar($texto) {
$texto = trim($texto) ;
$texto = htmlspecialchars($texto) ;
$texto = str_replace(chr(160),'',$texto) ;
return $texto ;
}
$nick = quitar($_POST[nick]) ;
$contrasena = md5(md5(quitar($_POST[contrasena]))) ;
$con = mysql_query("select id,contrasena from usuarios where nick='$nick'") ;
$datos = mysql_fetch_assoc($con) ;
if(mysql_num_rows($con)) {
if($datos[contrasena] == $contrasena) {
setcookie('uid',$datos[id],time()+604800) ;
setcookie('unick',$nick,time()+604800) ;
setcookie('ucontrasena',$contrasena,time()+604800) ;
header("location: $_SERVER[HTTP_REFERER]") ;}
else {
echo 'La contraseña es incorrecta. Haz click aquí para regresar.' ;
}
}
else {
echo 'El nick no existe. Haz click aquí para regresar.' ;
}
}
?>
Marcadores