Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/02/2011, 08:18
segmet
 
Fecha de Ingreso: octubre-2007
Mensajes: 7
Antigüedad: 16 años, 6 meses
Puntos: 0
por favor una ayuda con checkbox

Buenas tardes,
Resulta que el anterior webmaster, hizo un formulario en php, necesito hacer unas modificaciones como pones un multiple checkbox, pero no hay manera que funcione, pues no me envia por correo.
el codigo es el siguiente:


<?
$to = '[email protected]';


$aDoor = $_POST['formDoor'];
//Inicializamos la variable para le formulario
$contenidoForm = "";
if(empty($aDoor))
$contenidoForm = "Ninguna Selección";
else
{
$N = count($aDoor);
for($i=0; $i < $N; $i++)
$contenidoForm .= "<p>".$aDoor[$i]."</b>";
}


// subject
$subject = 'Cuestionario';

// message
$mensaje = "<p>Esto es lo que has seleccionado:</p>".$contenidoForm;



// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";

// Additional headers
$headers .= 'From: '.$_POST['formDoor'] .'' . "\r\n";


// Mail it

mail($to, "Asunto", $message, $headers); ?>


<SCRIPT LANGUAGE="javascript">location.href = "thanks.php";</SCRIPT>


y el formulario es:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>

</head>

<body>
<form action="checkbox-form.php" method="post">
Which buildings do you want access to?<br />
<input type="checkbox" name="formDoor[]" value="A" />Acorn Building<br />
<input type="checkbox" name="formDoor[]" value="B" />Brown Hall<br />
<input type="checkbox" name="formDoor[]" value="C" />Carnegie Complex<br />
<input type="checkbox" name="formDoor[]" value="D" />Drake Commons<br />
<input type="checkbox" name="formDoor[]" value="E" />Elliot House



<p><input type="submit" name="enviar" value="enviar" style="background-color:#900; color:#FFF; border:none; padding:10px;"/></p>
</form>
</body>
</html>


alguien puede ayudarme??
Mil gracias.