ola amigos de saben ando ase vastante tiempo en busca de info de como crear un formulario desde cero ...
e encontrado varios amnuales por al net pero no em funca nada que exo me pueden ayudar....
necesito crear un formulario de contacto desde cero ...
gracias...
mi mail
[email protected]
gracias
(contacto.php)
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>medio</title>
<style type="text/css">
<!--
body {
background-image: url(imagenes/reja%20okas.jpg);
background-repeat: repeat;
margin-left: 225px;
margin-right: 225px;
}
#apDiv1 {
position:absolute;
left:226px;
top:-6px;
width:789px;
height:407px;
z-index:1;
background-color: #000000;
}
#apDiv2 {
position:absolute;
left:0px;
top:3px;
width:789px;
height:14px;
z-index:2;
}
#apDiv3 {
position:absolute;
left:224px;
top:401px;
width:792px;
height:133px;
z-index:2;
background-color: #000000;
}
#apDiv4 {
position:absolute;
left:712px;
top:92px;
width:30px;
height:14px;
z-index:2;
}
#apDiv5 {
position:absolute;
left:43px;
top:114px;
width:714px;
height:14px;
z-index:2;
}
#apDiv6 {
position:absolute;
left:233px;
top:505px;
width:27px;
height:27px;
z-index:3;
}
#apDiv7 {
position:absolute;
left:273px;
top:483px;
width:700px;
height:53px;
z-index:4;
}
#apDiv8 { position:absolute;
left:229px;
top:525px;
width:27px;
height:27px;
z-index:3;
}
#apDiv9 {
position:absolute;
left:782px;
top:505px;
width:186px;
height:24px;
z-index:5;
}
#apDiv10 {
position:absolute;
left:984px;
top:506px;
width:28px;
height:24px;
z-index:4;
}
#apDiv11 {
position:absolute;
left:230px;
top:422px;
width:118px;
height:38px;
z-index:5;
}
#apDiv12 {
position:absolute;
left:417px;
top:517px;
width:149px;
height:29px;
z-index:6;
}
#apDiv13 {
position:absolute;
left:775px;
top:517px;
width:159px;
height:30px;
z-index:7;
}
#apDiv14 {
position:absolute;
left:237px;
top:10px;
width:771px;
height:377px;
z-index:8;
}
#apDiv15 {
position:absolute;
left:310px;
top:470px;
width:663px;
height:41px;
z-index:9;
}
#apDiv16 {
position:absolute;
left:298px;
top:10px;
width:672px;
height:401px;
z-index:10;
}
.Estilo3 {color: #FFFFFF}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<div id="apDiv1"><img src="imagenes/marco fotos.jpg" alt="marco" width="790" height="407" /></div>
<div id="apDiv3">
<div id="apDiv2"><img src="imagenes/ralla naranjaamarilla.jpg" alt="rella" width="790" height="8" /></div>
<div id="apDiv5"><img src="imagenes/ralla naranjaamarilla.jpg" alt="rella" width="714" height="8" /></div>
</div>
<div id="apDiv6"><img src="imagenes/clavo.jpg" alt="clavo" width="26" height="25" /></div>
<div id="apDiv10"><img src="imagenes/clavo.jpg" alt="clavo" width="26" height="25" /></div>
<div id="apDiv11"><img src="imagenes/informaciones boton2.jpg" alt="info" width="121" height="37" /></div>
<div id="apDiv16">
<form id="contacto" name="contacto" method="post" action="enviar.php">
<label></label>
<div align="center"><span class="Estilo3">Nombre</span>
<input name="nombre" type="text" id="nombre" size="30" />
</div>
<p align="center">
<label><span class="Estilo3">Email ....</span>
<input name="mail" type="text" id="mail" size="30" />
</label>
</p>
<p align="center">
<span class="Estilo3">
<label>Telefono
<input name="telefono" type="text" id="telefono" size="30" />
</label>
</span> </p>
<p align="center">
<span class="Estilo3">
<label>Motivo..
<input name="motivo" type="text" id="motivo" size="30" />
</label>
</span> </p>
<p align="center">
<span class="Estilo3">
<label>Mensaje
<br />
<textarea name="mensaje" id="mensaje" cols="40" rows="8"></textarea>
</label>
</span> </p>
<p align="center">
<label>Enviar
<input type="submit" name="Submit" id="Submit" value="Enviar" />
</label>
</p>
</form>
</div>
<div id="apDiv14">
</body>
</html>
(enviar.php)
<?php
$nombre = $_POST['nombre'];
$mail = $_POST['mail'];
$telefono = $_POST['telefono'];
$motivo = $_POST['motivo'];
$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 . ", con el motivo de " . $motivo . " \r\n";
$mensaje .= "Su e-mail es: " . $mail . " \r\n";
$mensaje .= "Su Telefono es: " . $telefono . " \r\n";
$mensaje .= "Mensaje: " . $_POST['mensaje'] . " \r\n";
$mensaje .= "Enviado el " . date('d/m/Y', time());
$para = '
[email protected]';
$asunto = 'Contacto desde pagina web';
mail($para, $asunto, utf8_decode($mensaje), $header);
echo "Mensaje enviado correctamente";
?>
que error puedo tener que no me funciona...
hoy ahyq ue hacer lago mas...??