Foros del Web » Programando para Internet » PHP »

Ayuda...formulario de contacto

Estas en el tema de Ayuda...formulario de contacto en el foro de PHP en Foros del Web. Hola a todos, soy muy novato en el tema web, estoy haciendo un sitio y tengo problemas con mi formulario de contacto, no se que ...
  #1 (permalink)  
Antiguo 17/12/2009, 07:04
 
Fecha de Ingreso: diciembre-2009
Mensajes: 3
Antigüedad: 14 años, 4 meses
Puntos: 0
Ayuda...formulario de contacto

Hola a todos, soy muy novato en el tema web, estoy haciendo un sitio y tengo problemas con mi formulario de contacto, no se que estoy haciendo mal, si alguien me ayuda mil gracias.
paso el codigo de programación

contacto.html

<!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 name="google-site-verification" content="CplPgx2oTfW5gH4j-I14ijiJybZiUYcP8E7NhGOwdT4" />

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>estampados-vinilos-serigrafias-bordados</title>
<style type="text/css">
<!--
#apDiv1 {
position:absolute;
left:353px;
top:229px;
width:1024px;
height:768px;
z-index:1;
}
#apDiv2 {
position:absolute;
left:108px;
top:14px;
width:1000px;
height:225px;
z-index:2;
}
#apDiv3 {
position:absolute;
left:883px;
top:303px;
width:225px;
height:190px;
z-index:3;
}
#apDiv4 {
position:absolute;
left:384px;
top:356px;
width:570px;
height:369px;
z-index:4;
}
body,td,th {
font-family: estampados - vinilo - serigrafias - bordados;
}
body {
background-color: #EFB6EF;
background-image: url(fondo/baners_estatico_principal_02.png);
}
#apDiv5 {
position:absolute;
left:298px;
top:365px;
width:572px;
height:128px;
z-index:5;
}
#apDiv6 {
position:absolute;
left:107px;
top:247px;
width:1002px;
height:48px;
z-index:6;
}
.style1 {
font-size: 14px;
font-weight: bold;
}
.style2 {
font-size: 18px;
color: #0000FF;
font-family: Arial, Helvetica, sans-serif;
}
#apDiv7 {
position:absolute;
left:166px;
top:305px;
width:40px;
height:40px;
z-index:7;
}
#apDiv8 {
position:absolute;
left:166px;
top:385px;
width:40px;
height:40px;
z-index:8;
}
#apDiv9 {
position:absolute;
left:135px;
top:346px;
width:113px;
height:14px;
z-index:9;
}
#apDiv10 {
position:absolute;
left:162px;
top:427px;
width:48px;
height:15px;
z-index:10;
}
#apDiv11 {
position:absolute;
left:299px;
top:513px;
width:180px;
height:85px;
z-index:11;
}
#apDiv12 {
position:absolute;
left:689px;
top:513px;
width:180px;
height:85px;
z-index:12;
}
#apDiv13 {
position:absolute;
left:489px;
top:513px;
width:180px;
height:85px;
z-index:13;
}
.style3 {
font-size: 16px
}
.style5 {color: #FF0000}
#apDiv14 {
position:absolute;
left:883px;
top:511px;
width:225px;
height:123px;
z-index:14;
}
.style6 {color: #0000FF}
#apDiv15 {
position:absolute;
left:166px;
top:470px;
width:40px;
height:40px;
z-index:15;
}
#apDiv16 {
position:absolute;
left:154px;
top:511px;
width:65px;
height:45px;
z-index:16;
}
#apDiv17 {
position:absolute;
left:1119px;
top:247px;
width:187px;
height:229px;
z-index:17;
}
#apDiv18 {
position:absolute;
left:1121px;
top:304px;
width:200px;
height:200px;
z-index:17;
}
#apDiv19 {
position:absolute;
left:1128px;
top:307px;
width:200px;
height:200px;
z-index:17;
}
#apDiv20 {
position:absolute;
left:1123px;
top:308px;
width:200px;
height:200px;
z-index:17;
}
#apDiv21 {
position:absolute;
left:1122px;
top:307px;
width:200px;
height:200px;
z-index:17;
}
#apDiv22 {
position:absolute;
left:1117px;
top:304px;
width:200px;
height:196px;
z-index:17;
}
#apDiv23 {
position:absolute;
left:1117px;
top:304px;
width:200px;
height:200px;
z-index:17;
}
#apDiv24 {
position:absolute;
left:1118px;
top:308px;
width:200px;
height:200px;
z-index:17;
}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.estamparte.net");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-11994157-1");
pageTracker._trackPageview();
} catch(err) {}</script>
<body>
<div id="apDiv2"><img src="banners/baners_estatico_principal_02.png" width="1000" height="225" /></div>
<noscript>
<h1>Estampados>
Estamparte sitio de estampados en vinilos, serigrafias, bordados computarizados estampados en remeras, chombas, gorras, zona de belgrano</noscript>
<div id="apDiv4">
<p>
<title>Mándanos tus comentarios</title>
</head>

<body bgcolor="#cccc66" text="#003300" link="#006060" vlink="#006060">
<?
if ($_POST){
?>
<form action="enviar_correo.php" method=post>
Nombre: <input type=text name="nombre" size=16>
<br>
Email: <input type=text name=email size=16>
<br>
Comentarios: <textarea name=coment cols=32 rows=6></textarea>
<br>
<input type=submit value="Enviar">
</form>
<?
}else{
//Estoy recibiendo el formulario, compongo el cuerpo
$cuerpo = "Formulario enviado\n";
$cuerpo .= "Nombre: " . $_POST["nombre"] . "\n";
$cuerpo .= "Email: " . $_POST["email"] . "\n";
$cuerpo .= "Comentarios: " . $_POST["coment"] . "\n";

//mando el correo...
mail("[email protected]","Formulario recibido",$cuerpo);

//doy las gracias por el envío
echo "Gracias por rellenar el formulario. Se ha enviado correctamente.";
}
?>
</div>
<div class="style1" id="apDiv6">
<div align="center" class="style2">
<p align="left" class="style3"><span class="style6">Estamparte:</span> <span class="style5">es un microemprendimiento que realiza estampado textil con Vinilo, Serigrafía y Bordado Computarizado, ofreciendo a nuestros actuales y futuros clientes el mejor servicio, la mejor calidad, el mejor precio y por sobre todo la mejor atención.</span></p>
</div>
</div>
<div id="apDiv7"><img src="iconos/home.png" width="40" height="40" /></div>
<div id="apDiv8"><img src="iconos/correo.png" width="40" height="40" border="0" /></div>
<div id="apDiv9">Página Principal</div>
<div id="apDiv10">Correo</div>
<div id="apDiv15"><a href="dondeestamos.html"><img src="iconos/donde-estamos.png" width="40" height="40" border="0"/></a></div>
<div id="apDiv16">
<div align="center">Donde Estamos</div>
</div>
</body>
</html>


enviar_correo.php

<?
/* PARA TU PAGINA .COM */
/* Editalo a tu preferencia */



$mailto = '[email protected]'; // insert the email address you want the form sent to

$returnpage = '/'; // insert the name of the page/location you want the user to be returned to

$sitename = '[http://www.estamparte.net - Contacto]'; // insert the site name here, it will appear in the subject of your email



/* Do not edit below this line unless you know what you're doing */



$name = $_POST['nombre'];

$email = $_POST['email'];

$enquiry = stripslashes($_POST['coment']);



if (!$name) {

print("<strong>Error:</strong> Escriba su nombre.<br/><br/><a href='java script:history.go(-1)'>Regresar</a>");

exit;

}

if (!$email) {

print("<strong>Error:</strong> Porfavor escriba su e-mail.<br/><br/><a href='java script:history.go(-1)'>Regresar</a>");

exit;

}

if (!$enquiry) {

print("<strong>Error:</strong> Porfavor escriba un comentario.<br/><br/><a href='java script:history.go(-1)'>Regresar</a>");

exit;

}

if (!eregi("^[a-z0-9]+([-_\.]?[a-z0-9])+@[a-z0-9]+([-_\.]?[a-z0-9])+\.[a-z]{2,4}", $email)){

print("<strong>Error:</strong> este email no es valido, favor escribir su e-mail el correcto.<br/><br/><a href='java script:history.go(-1)'>Regresar</a>");

exit;


}



$message = "\n$name te ha enviado el siguiente comentario:\n\n$enquiry\n\n Sus datos son:\n\nNombre: $name\nCorreo: $email\nTeléfono: $telefono\n\n";



mail($mailto, "$sitename Contact Form Enquiry from $name", $message, "From: $email");

header("Location: " . $returnpage);

?>
  #2 (permalink)  
Antiguo 17/12/2009, 07:19
 
Fecha de Ingreso: abril-2003
Mensajes: 1.129
Antigüedad: 21 años
Puntos: 34
Respuesta: Ayuda...formulario de contacto

No hace falta que pegues todo el Style, se hace un lio con tanto código...

A simple vista, primero veo que cierras 2 veces el head

Cita:
<title>Mándanos tus comentarios</title>
</head>
Cita:
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
¿Qué es lo que hace o deja de hacer, cuál es el error que ves puntualmente?
__________________
elGastronomo
  #3 (permalink)  
Antiguo 17/12/2009, 08:32
 
Fecha de Ingreso: diciembre-2009
Mensajes: 3
Antigüedad: 14 años, 4 meses
Puntos: 0
Respuesta: Ayuda...formulario de contacto

muchas gracias por contestar

puntualmente no llega a la casilla de correo el mensaje...
hace como que lo envia, pero no llega nada
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 14:47.