Ver Mensaje Individual
  #11 (permalink)  
Antiguo 08/09/2015, 07:20
Vcnt
 
Fecha de Ingreso: octubre-2009
Mensajes: 299
Antigüedad: 15 años, 4 meses
Puntos: 2
Respuesta: Configurar formulario web una pagina

Tambien esta en blanco
Código HTML:
<form method="post" action="">
					<div class="to">
                     	<input type="text" class="text" value="Nombre" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Name';}">
					 	<input type="text" class="text" value="Correo" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email';}" style="margin-left:20px">
					 	<input type="text" class="text" value="Teléfono" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Phone';}" style="margin-left:20px">
					</div>
					<div class="contact_bottom-textarea">
	                   <textarea value="Message" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Message';}">Correo</textarea>
	                </div>
	                <div class="form-submit1">
			           <input name="submit" type="submit" id="submit" value="Enviar correo"><br>
			           <p class="m_msg">Asegurese que ha introducido una dirección correcta</p>
					</div>
					<div class="clear"></div>
                 </form>
             </div>
            </div>
      	    <div class="copy">
		       <p> 2015 TIENDA</p>
		    </div>
          </div>
          <script type="text/javascript">
				$(document).ready(function() {
					/*
					var defaults = {
			  			containerID: 'toTop', // fading element id
						containerHoverID: 'toTopHover', // fading element hover id
						scrollSpeed: 1200,
						easingType: 'linear' 
			 		};
					*/
					
					$().UItoTop({ easingType: 'easeOutQuart' });
					
				});
			</script>
		    <a href="#" id="toTop" style="display: block;"> <span id="toTopHover" style="opacity: 1;">top </span></a>
			</div>
		</div>
		<!----//End-footer---->
		<!----//End-container---->  
</body>
</html>
<?php
if(empty($_POST['submit'])){}
else{
    $Name = $_POST['Name'];
    $Email = $_POST['Email'];
    $Phone = $_POST['Phone'];
    $Message = $_POST['Message'];
    
    
$para      = "[email protected]";
$titulo    = "Correo Web";
 
$mensaje   = "Mensaje enviado por: ".$Name."\n";
$mensaje  .= "E-mail: ".$Email;
$mensaje  .= "Telefono: ".$Phone;
$mensaje  .= "Asunto: ".$Message;
 
$cabeceras = 'From: [email protected]' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
 
mail($para, $titulo, $mensaje, $cabeceras);
    if(mail){
        echo " 
                <script language='JavaScript'> 
                alert('Mensaje Enviado Correctamente'); 
                </script>";
    } else {
        echo " 
                <script language='JavaScript'> 
                alert('Fallo el envio del mensaje'); 
                </script>";
    }
 
}
?>