Foros del Web » Programando para Internet » PHP »

Ayuda con este formulario

Estas en el tema de Ayuda con este formulario en el foro de PHP en Foros del Web. Tengo este formulario en html con un otro en php. Ambos archivos los tengo en el mismo sitio, el documento php lo tengo bajo el ...
  #1 (permalink)  
Antiguo 15/12/2010, 13:12
 
Fecha de Ingreso: octubre-2010
Mensajes: 33
Antigüedad: 13 años, 6 meses
Puntos: 0
Ayuda con este formulario

Tengo este formulario en html con un otro en php. Ambos archivos los tengo en el mismo sitio, el documento php lo tengo bajo el nombre "formulario php.php"Pero no manda los mail. Dejo los codigos para que alguien me diga que esta mal por favor. [URL="http://www.glamesteticayshop.com.ar"][/URL]

<form method="post" action="formulario PHP.php">
<table width="571" height="403" border="0" align="center">

<tr>
<td width="250" height="20"><h5>NOMBRE:</h5></td>
<td width="311" height="20"><label><input name="nombre" type="text" id="nombre" size="50" /></label> </td>
</tr>
<tr>
<td width="250" height="20"><h5>DIRECCION:</h5></td>
<td width="311" height="20"><label><input name="direccion" type="text" id="dirección" size="50" /></label></td>
</tr>
<tr>
<td width="250" height="20"><h5>EMAIL:</h5></td>
<td width="311" height="20"><label><input name="email" type="text" id="email" size="50" /></label></td>
</tr>
<tr>
<td width="250" height="20"><h5>TEL.PARTICULAR:</h5></td>
<td width="311" height="20"><label><input name="tel.particular:" type="text" id="tel.particular" size="30" /></label></td>
</tr>
<tr>
<td width="250" height="20"><h5>CELULAR:</h5></td>
<td width="311" height="20"><label><input name="celular" type="text" id="celular" size="30" /></label></td>
</tr>
<tr>
<td width="250" height="269"><h5>&nbsp;</h5>
<h5>NOMBRE: GLAM ESTETICA Y SHOP</h5>
<h5>DIRECCION: CHACABUCO 241</h5>
<h5>TELEFONO: 4331-5486</h5>
<h5>EMAIL: [email protected]</h5></td>
<td width="311" height="269"><textarea name="mensaje" cols="45" rows="15" id="mensaje"></textarea>
<label><input type="submit" name="enviar" id="enviar" value="Enviar" /></label></td>
</tr>


Aca estan los codigos php:



<?php
$nombre = $_POST['nombre'];
$direccion = $_POST['dirección'];
$mail = $_POST['mail'];
$telefono = $_POST['tel.particular'];
$celular = $_POST['celular'];

$header = 'From: ' . $mail . " \r\n";
$header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
$header .= "Mime-Version: 1.0 \r\n";
$header .= "Content-Type: text/plain";

$mensaje = "Este mensaje fue enviado por " . $nombre . ", direccion" . $direccion . " \r\n";
$mensaje .= "Su e-mail es: " . $mail . " \r\n";
$mensaje .= "Su telefono es: " . $telefono . " \r\n";
$mensaje .= "Su celular es: " . $celular . " \r\n";
$mensaje .= "Mensaje: " . $_POST['mensaje'] . " \r\n";
$mensaje .= "Enviado el " . date('d/m/Y', time());

$para = '[email protected]';
$asunto = 'MENSAJE DE CONTACTO DE GLAM';


mail($para, $asunto, utf8_decode($mensaje), $header);


?>
<h2>Gracias!</h2>

<p>Tu mensaje ha sido enviado, pronto nos pondremos en contacto con usted.</p>

<p><span style="color:red;font-size:150%;font-weight:bold;"><?php print $email; ?></span></p>

<script type='text/javascript'>

document.write('');

</script>

<script type='text/javascript'>

setTimeout('history.go(-2)', 9000);

</script>

</table>
</form>
  #2 (permalink)  
Antiguo 15/12/2010, 16:41
Avatar de maycolalvarez
Colaborador
 
Fecha de Ingreso: julio-2008
Ubicación: Caracas
Mensajes: 12.120
Antigüedad: 15 años, 8 meses
Puntos: 1532
Respuesta: Ayuda con este formulario

¿te aparece algún error?, ¿verificaste la bandeja de SPAM?, ¿si tu server es windows, instalaste y configuraste el SMTP?

para verificar que el mail se envió, la función mail() devuelve 1
__________________
¡Por favor!: usa el highlight para mostrar código
El que busca, encuentra...
  #3 (permalink)  
Antiguo 15/12/2010, 16:54
Avatar de caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años
Puntos: 1284
Respuesta: Ayuda con este formulario

Hola:

input name="email"
...
$mail = $_POST['mail'];

Si el control es "email", debes usar $_POST["email"]

Saludos
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo
  #4 (permalink)  
Antiguo 15/12/2010, 18:13
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 11 meses
Puntos: 2135
Tema movido desde Web general a PHP
  #5 (permalink)  
Antiguo 15/12/2010, 18:45
 
Fecha de Ingreso: marzo-2008
Mensajes: 1.020
Antigüedad: 16 años, 1 mes
Puntos: 21
Respuesta: Ayuda con este formulario

no esta mal tu action="enviar.php" ????

Etiquetas: formulario
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:51.