Skip to content

Commit

Permalink
Prueba form de contacto
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergiioog committed Oct 22, 2023
1 parent 980bc02 commit bb11cbc
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
8 changes: 4 additions & 4 deletions contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@

<section id="contacto_seccion">
<h3>TRABAJEMOS JUNTOS</h3>
<form id="formulario" action="#" method="post">
<form id="formulario" action="enviar.php" method="post">
<div class="form-group">
<label for="nombre">Nombre:</label>
<input type="text" id="nombre" name="nombre" required>
</div>
<div class="form-group">
<label for="apellido">Primer Apellido:</label>
<input type="text" id="apellido" name="apellido" required>
<input type="text" id="apellido" name="apellido" >
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<input type="email" id="email" name="correo" required>
</div>
<div class="form-group">
<label for="mensaje">Mensaje:</label>
<textarea id="mensaje" name="mensaje" rows="4" required></textarea>
</div>
<div class="botonSubmit">
<button type="submit">Enviar</button>
<input type="submit" value="Enviar mensaje">
</div>

</form>
Expand Down
24 changes: 24 additions & 0 deletions enviar.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

//Llamamos a los campos
$nombre = $_POST['nombre'];
$apellido = $_POST['apellido'];
$correo = $_POST['correo'];
$mensaje = $_POST['mensaje'];

// Datos para el correo
$destinatario = "[email protected]";
$asunto = "Contacto desde nuestra web";

$carta = "De: $nombre \n";
$carta .= "Correo: $correo \n";
$carta .= "Apellido: $apellido \n";
$carta .= "Mensaje: $mensaje";

//Enviando mensaje
mail($destinatario,$asunto,$carta);




?>
5 changes: 4 additions & 1 deletion index.css
Original file line number Diff line number Diff line change
Expand Up @@ -610,10 +610,13 @@ a,li:hover {
justify-content: center;
align-items: center;
}
.botonSubmit button {
.botonSubmit input {
height: 80%;
width: 50%;
border-radius: 10px;
border: none;
}
.botonSubmit input:hover {
cursor: pointer;
}
/*-------SECCION CONTACTO-------*/

0 comments on commit bb11cbc

Please sign in to comment.