Ver Mensaje Individual
  #31 (permalink)  
Antiguo 13/01/2004, 10:23
Tidus_18
 
Fecha de Ingreso: enero-2004
Ubicación: En un lugar donde abunda la MaGiA
Mensajes: 98
Antigüedad: 20 años, 3 meses
Puntos: 0
me sigue dando error solo que ahora cambia lo de niumero de linea.., esta claro que el error esta en lo de gracias.htm, pero no se por que.., mejor escribo aqui todo, y a ver si ves el fallo:

<html>
<head>
<title>Genes Pok&eacute;mon</title>
<meta http-equiv="" content="text/html; charset=iso-8859-1">
<meta http-equiv="" content="text/html; charset=iso-8859-1">
</head>

<body><? $mensaje = "";
if (isset($_POST["enviar"])){
if(empty($_POST[nombre])){
$mensaje .= "Debes escribir un nombre.<br>";
}
if(empty($_POST[email])){
$mensaje .= "Debes colocar tu email.<br>";
}
if ($mensaje != ""){
echo "Se han producido los siguientes errores:<br>".$mensaje;
echo "<input TYPE=\"button\" VALUE=\" ATRÁS\" onClick=\"history.go(-1)\">";
}
}
//Estoy recibiendo el formulario, compongo el cuerpo
$cuerpo = "Formulario enviado\n";
$cuerpo .= "Nombre: " . $_POST["nombre"] . "\n";
$cuerpo .= "Nick: " . $_POST["nick"] . "\n";
$cuerpo .= "Contraseña: " . $_POST["contraseña"] . "\n";
$cuerpo .= "E-mail: " . $_POST["email"] . "\n";
$cuerpo .= "Pokémon Favorito: " . $_POST["pokemon"] . "\n";
$cuerpo .= "¿Trabajas para otra web?: " . $_POST["trabajas"] . "\n";
$cuerpo .= "Comentarios: " . $_POST["comentarios"] . "\n";
$cuerpo = nl2br($cuerpo);
$to = "[email protected]";
$subject = "$nombre - Reporteros Genes Pokémon";
$mailheader = "MIME-Version: 1.0 \r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1 \r\n";
$mailheader .= "From: Quiero ser reportero <$email> \r\n";
$mailheader .= "Return-path: $email \r\n";
$mailheader .= "X-Priority: 1 \r\n";
$mailheader .= "X-MSMail-Priority: High \r\n";
$mailheader .= "X-Mailer: PHP/".phpversion()." \n";
if (mail ($to,$subject,$cuerpo,$mailheader))
{
header("Location:/gracias.htm");
exit;
} else {
header("Location:/error.htm");
exit;
}
?></body>
</html>



respecto a lo que me ponia en ver codigo fuente era lo siguiente:

<html>
<head>
<title>Genes Pok&eacute;mon</title>
<meta http-equiv="" content="text/html; charset=iso-8859-1">
<meta http-equiv="" content="text/html; charset=iso-8859-1">
</head>

<body><br />
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/tidus17/public_html/datos.php:8) in <b>/home/tidus17/public_html/datos.php</b> on line <b>42</b><br />
__________________
Un buen foro_Para aprender PHP