Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/10/2009, 18:06
Joseph
 
Fecha de Ingreso: febrero-2003
Mensajes: 233
Antigüedad: 21 años, 2 meses
Puntos: 4
Problemas al recibir los datos

Estoy realizando u n formulario (Encuesta) donde debo recibir datos adjuntos, en la variable $body al colocar solo un campo del formulario me funciona bien, el problema se presenta cuando quiero que sean mas de 2 campos... el adjunto funciona tambien con un solo campo del formulario. de resto no me llega el mensaje.

aca dejo el codigo a ver si me pueden ayudar, gracias de antemano.

<?php
require("class.phpmailer.php");
if ($_POST['action'] == "send") {
$varname = $_FILES['archivo1']['name'];
$vartemp = $_FILES['archivo1']['tmp_name'];

$mail = new PHPMailer();
$mail->Host = "localhost";
$mail->From = "[email protected]";
$mail->FromName = "Blog Unijimpe";
$mail->Subject = $_POST['asunto'];
$mail->AddAddress($_POST[xxx]);
if ($varname != "") {
$mail->AddAttachment($vartemp, $varname);
}
$body = "Dep".$_POST["xxx"]."\n " .$_POST["xxx"]."\n " .$_POST["xxx"]."\n ".$_POST["xxx"]."\n " .$_POST["xxx"]."\n " .$_POST["xxx"]."\n " .$_POST["xxx"]."\n " .$_POST["xxx"] ."\n " .$_POST["xxx"]."\n " .$_POST["xxx"]."\n " .$_POST["xxx"]."\n ".$_POST["xxx"]."\n ".$_POST["xxx"]."\n ".$_POST["xxx"]."\n ".$_POST["xxx"]
$mail->Body = $body;
$mail->IsHTML(true);
$mail->Send();
}

?>


tambien lo intente colocando

$body.= $_POST['xxx]."<br>"; por cada campo, ejemplo:

$body.= $_POST['campo1']."<br>";
$body.= $_POST['campo2']."<br>";
$body.= $_POST['campo3']."<br>";