Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/02/2013, 15:41
pabloem1972
 
Fecha de Ingreso: noviembre-2010
Mensajes: 48
Antigüedad: 13 años, 5 meses
Puntos: 1
Formulario php

HOLA ESTOY HACIENDO UNA WEB CON UN FORMULARIO CON VALIDACION Y UN ARCHIVO PHP PARA ENVIAR EL RESULTADO DEL FORMAULARIO A UN EMAIL.
TODO VA BIEN EL FORMULARIO ANDA PERFECTO LA VALIDACION TAMBIEN Y SE ENVIAN LOS EMAILS. EL UNICO TEMA ES QUE EN LOS EMAILS NO ME LLEGA LA INFORMACION QUE INGRESA LA PERSONA QUE LLENA EL FORMULARIO (LLEGAN LOS EMAILS PERFECTOS PERO FALTA LA INFORMACION QUE INGRESA EL VISITANTE).
MUCHO NO SE DE PHP. PERO ME PARECE QUE HAY ALGO QUE NO COINCIDE ENTRE EL FORMULARIO Y EL PHP PARA EL ENVIO.

LES ENVIO EL CODIGO DEL FORMULARIO QUE ESTA EN EL HTML:

<form action="php/quickcontact.php" method="post" id="contactwidget">
<div class="inp_l">
<div class="inp_r"><input type="text" name="wname" id="wname" value="Nombre" size="22" tabindex="11" alt="Nombre" /></div>
</div>

<div class="inp_l">
<div class="inp_r"><input type="text" name="wemail" id="wemail" value="Email" size="22" tabindex="12" alt="Email" /></div>
</div>
<table>
<tr>
<td class="text_t_l"></td>
<td class="text_t"></td>
<td class="text_t_r"></td>
</tr>
<tr>
<td class="text_l"></td>
<td class="text_m"><textarea name="wmessage" id="wmessage" cols="28" rows="6" tabindex="13" title="Mensaje">Mensaje</textarea></td>
<td class="text_r"></td>
</tr>
<tr>
<td class="text_b_l"></td>
<td class="text_b"></td>
<td class="text_b_r"></td>
</tr>
</table>
<div class="loading"></div>
<div><input type="hidden" name="wcontactemail" id="wcontactemail" value="[email protected]" /></div>
<div><input type="hidden" name="wcontacturl" id="wcontacturl" value="php/quickcontact.php" /></div>
<div><a href="php/quickcontact.php" id="wformsend" class="button" tabindex="14"><span>Enviar</span></a></div>
</form>


Y EL DEL ARCHIVO PHP DE ENVIO:

<?php
if ((isset($_POST['wname'])) && (strlen(trim($_POST['wname'])) > 0)) {
$contact_name = stripslashes(strip_tags($_POST['wname']));
} else {$contact_name = 'No contact name entered';}
if ((isset($_POST['wemail'])) && (strlen(trim($_POST['wemail'])) > 0)) {
$contact_email = stripslashes(strip_tags($_POST['wemail']));
} else {$contact_email = 'No email entered';}
if ((isset($_POST['wmessage'])) && (strlen(trim($_POST['wmessage'])) > 0)) {
$contact_message = stripslashes(strip_tags($_POST['wmessage']));
} else {$contact_message = 'No message entered';}
ob_start();
?>
<html>
<head>
<style type="text/css">
</style>
</head>
<body>
<table width="550" border="1" cellspacing="2" cellpadding="2">
<tr bgcolor="#eeffee">
<td>Name</td>
<td><?=$wname;?></td>
</tr>
<tr bgcolor="#eeeeff">
<td>Email</td>
<td><?=$wemail;?></td>
</tr>
<tr bgcolor="#eeeeff">
<td>Message</td>
<td><?=$wmessage;?></td>
</tr>
</table>
</body>
</html>
<?
$body = ob_get_contents();

$to = '[email protected]';
$email = '[email protected]';
$fromaddress = "[email protected]";
$fromname = "Online Contact";

require("phpmailer.php");

$mail = new PHPMailer();

$mail->From = "[email protected]";
$mail->FromName = "Contacto";
$mail->AddAddress("[email protected]","Pablo"); //change to your email address

$mail->WordWrap = 50;
$mail->IsHTML(true);

$mail->Subject = "Quickcontact: Mensaje recibido";
$mail->Body = $body;
$mail->AltBody = "This is the text-only body";

if(!$mail->Send()) {
$recipient = '[email protected]'; //change to your email address
$subject = 'contactwidget failed';
$content = $body;
mail($recipient, $subject, $content, "From: [email protected]\r\nReply-To: $email\r\nX-Mailer: DT_formmail");
exit;
}
?>

SI ME PUEDEN AYUDAR LES ESTARIA MUY AGRADECIDO.