Eres muy amable conmigo, así que me voy a permitir abusar una última vez de tus conocimientos.
No consigo que funcione, siempre me abre la página de error. Te doy los códigos a ver si puedes identificar mi error.
HTML:<table width="92%" border="0px" cellpadding="0px" cellspacing="0px">
<FORM action="envio.php" method="get">
<tr>
<td class="contacto1">Nombre:</td>
<td class="contacto"><input name="nombre" type="text " size="32"></td>
</tr>
<tr>
<td class="contacto1">Primer Apellido:</td>
<td class="contacto"><INPUT TYPE="text" NAME="apellido1" SIZE="32"></td>
</tr>
<tr>
<td class="contacto1">Segundo Apellido:</td>
<td class="contacto"><INPUT TYPE="text" NAME="apellido2" SIZE="32"></td>
</tr>
<tr>
<td class="contacto1">Sus hijos/as están matriculados en: </td>
<td class="contacto">
Infantil <input type="checkbox" name="C1" value="ON">
Primaria
<input type="checkbox" name="C2" value="ON">
Secundaria
<input type="checkbox" name="C3" value="ON"></td>
</tr>
<tr>
<td class="contacto1">e-mail: </td>
<td class="contacto"><INPUT TYPE="text" NAME="email" SIZE="32"></td>
</tr>
<tr>
<td class="contacto1">Sugerencia/queja: </td>
<td class="contacto"><TEXTAREA NAME="texto" ROWS="5"COLS="41"></TEXTAREA></td>
</tr>
<tr>
<td class="contacto1"><INPUT TYPE="submit" VALUE= "Enviar "><INPUT TYPE="reset" value="Restablecer"></td> <td class="contacto1"></td>
</tr>
</FORM>
</table>
ENVIO.PHP<?
/* aqui se incializan variables de PHP */
if (phpversion() >= "4.2.0") {
if ( ini_get('register_globals') != 1 ) {
$supers = array('_REQUEST',
'_ENV',
'_SERVER',
'_POST',
'_GET',
'_COOKIE',
'_SESSION',
'_FILES',
'_GLOBALS' );
foreach( $supers as $__s) {
if ( (isset($$__s) == true) && (is_array( $$__s
) == true) ) extract( $$__s, EXTR_OVERWRITE );
}
unset($supers);
}
} else {
if ( ini_get('register_globals') != 1 ) {
$supers = array('HTTP_POST_VARS',
'HTTP_GET_VARS',
'HTTP_COOKIE_VARS',
'GLOBALS',
'HTTP_SESSION_VARS',
'HTTP_SERVER_VARS',
'HTTP_ENV_VARS'
);
$_GET['nombre']=$nombre;
$_GET['edad']=$edad;
foreach( $supers as $__s) {
if ( (isset($$__s) == true) && (is_array( $$__s
) == true) ) extract( $$__s, EXTR_OVERWRITE );
}
unset($supers);
}
}
/* ------------------------------------------------------------------ */
/* DE AQUI EN ADELANTE PUEDES EDITAR EL ARCHIVO */
/* ------------------------------------------------------------------ */
/* define cual va a ser la hoja que se abrirá en caso de error*/
$login_page = "error.html";
$respuesta="correcto.html";
/* reclama que estén rellenos los campos obligatorios del formulario */
if($nombre=="")
{include($login_page);
exit();
}
if($apellido1=="")
{include($login_page);
exit();
}
if($apellido2=="")
{include($login_page);
exit();
}
if($email=="")
{include($login_page);
exit();
}
if (!isset($C1) && !isset($C2) && !isset($C3))
{include($login_page);
exit();
}
if($texto=="")
{include($login_page);
exit();
}
/* ------------------------------------------------------------------ */
/* aquí se especifica la pagina de respuesta en caso de envío exitoso */
$respuesta="correcto.html";
/* AQUÍ ESPECIFICAS EL CORREO AL CUAL SE ENVÍAN LOS DATOS */
$para ="[correo eliminado] ";
/* AQUI ESPECIFICAS EL SUJETO DEL EMAIL */
$sujeto = "Formulario de informacion";
/* aquí se construye el encabezado del correo*/
$encabezado = "From: $nombre <$email>";
$encabezado .= "\nReply-To: $email";
$encabezado .= "\nX-Mailer: PHP/" . phpversion();
/* con esto se captura la IP del que envío el mensaje */
$ip=$REMOTE_ADDR;
/* las siguientes líneas arman el mensaje */
$mensaje .= "Nombre = $nombre\n";
$mensaje .= "Primer Apellido = $apellido1\n";
$mensaje .= "Segundo Apellido= $apellido2\n";
$mensaje .= "email = $email\n";
$mensaje .= "Infantil= $C1\n";
$mensaje .= "Primaria = $C2\n";
$mensaje .= "Secundaria = $C3\n";
$mensaje .= "Comentario = $texto\n";
$mensaje .= "SU DIRECCION IP = $ip\n";
/* aqui se intenta enviar el correo, si no se
tiene éxito se da un mensaje de error */
if(!mail($para, $sujeto, $mensaje, $encabezado))
{
echo "<h1>No se pudo enviar el Mensaje</h1>";
exit();
}
else
{
/* aqui redireccionamos a la pagina de respuesta */
echo "<meta HTTP-EQUIV='refresh' content='1;url=$respuesta'>";
}
?>
URL:http://www.cardenalspinolahuelva.es/buzon2.htmsaludos desde Huelva