Saludos.
Alguien me puede indicar cual es el error de este formulario, solo me llega el dato del email y el texto de cada campo pero sin las variables, osea, llega
Nombre:
País:
y asi pero sin variables, solo el email llega bien.
Código PHP:
Ver original<?php
////////////////////Aqui va la respuesta inmediata al cliente//////////////
$email = $_POST["email"];
$myname = "VtX Costa Rica, Soporte";
$subject = "Formulario de consulta recibido";
$body = "Estimado(a) $nombre \n
Nuestro departamento de soporte ha recibido su consulta. Gracias.
Respetuosamente,
VtX-cr Webmaster
http://vtx-cr.com ";
$headers = "Content-Type: text/plain; charset=us-ascii\nFrom: $myname <$myemail>\nReply-To:<$myemail>\nReturn-Path: <$myemail>\nX-Mailer: PHP";
mail($email,$subject,$body,$headers);
///////// Aqui va lo que se llena en el formulario //////////
if (!isset($visitormail)) echo " http://vtx-cr.com " ;
$todayis = date("m d Y") ; $subject = "Formulario de contacto desde VTX website" ;
$message = " $todayis [EST] \n
Nombre: $nombre \n
Pais: $pais \n
E-Mail: $email \n
Tipo de consulta: $consulta \n
Teléfono: $telefono \n
Dirección: $direccion \n
Mensaje: $mensaje \n
Hasta aqui la información recibida ;\n
";
$from = "From: $email\r\n";
if ($myemail != "")
mail($myemail, $subject, $message, $from); ?>
el form
Código HTML:
<form id="Contacto" name="Contacto" method="post" action="send.php">
<span class="style1" >Nombre completo:</span>
<label>
<input name="nombre" type="text" id="nombre" style="margin-left:20px" size="30px" />
</label>
<br />
<span class="style1" > Pais:</span>
<label>
<input name="pais" type="text" id="pais" size="30px" style="margin-left:98px" />
</label>
<br />
<span class="style1" >E-Mail:</span>
<label>
<input name="email" type="text" id="email" size="30px" style="margin-left:88px" />
</label>
<br />
<span class="style1" > Tipo de consulta:</span> .
<label>
<select name="consulta" id="consulta" >
<option value="general">Consulta en General</option>
<option value="soporte">Soporte Técnico</option>
<option value="plantillas">Plantillas Web</option>
<option value="hosting">Servicio Hosting</option>
<option value="hosting">Catálogo de plantillas</option>
</select>
</label>
<br />
<span class="style1" > Teléfono fijo o Celular:</span>
<label>
<input name="telefono" type="text" id="telefono" size="30px" style="margin-left:0px" />
</label>
<br />
<span class="style1" >Dirección:</span>
<label>
<input name="direccion" type="text" id="direccion" size="30px" style="margin-left:70px" />
</label>
<p><br />
<span class="style1" >Escriba su Consulta aquí:</span> </p>
<label>
<textarea name="mensaje" id="mensaje" cols="50" rows="13"></textarea>
</label>
<br />
<label>
<input type="submit" name="enviar" id="enviar" value="Submit" />
</label>
<label>
<input type="reset" name="Borrar" id="Borrar" value="Reset" />
</label>
</form>