HTML:
Código
<section id="main" class="container 75%"> <header> </header> <div class="box"> <form action="archius.php" method="post"> <div class="row uniform 50%"> <div class="6u 12u(mobilep)"> <input type="text" name="name" id="name" value="" placeholder="Nom i cognom" required/> </div> <div class="6u 12u(mobilep)"> <input type="email" name="email" id="email" value="" placeholder="Correu electrònic" required/> </div> </div> <div class="row uniform 50%"> <div class="12u"> <input type="text" name="subject" id="subject" value="" placeholder="Raó" required/> </div> </div> <div class="row uniform 50%"> <div class="12u"> </div> </div> <div class="row uniform"> <div class="12u"> <ul class="actions align-center"> </ul> </div> </div> <div class="row uniform"> <div class="12u"> <ul class="actions align-center"> </ul> </div> </div> </form> </div> </section>
PHP:
Código
<?php $name = $_POST["name"]; $email = $_POST["email"]; $message = $_POST["message"]; $file = $_POST["file"]; $subject = $_POST["subject"]; $para = "asdasd@asdasd.com"; $titulo = "Acadèmia"; $header = "De: " . $email; $msjCorreo = "Nom: $name\nCorreu: $email\nRaó: $subject\nArchiu: $file\n\nMissatge:\n$message"; if ($_POST["submit"]) { echo '<script language="javascript"> alert("Misatge enviat."); window.location.href = "/archius.html"; </script>'; } else { echo "Error."; } } ?>
Por cierto, no se porque algunas letras me salen raras en el correo, acentos y eso... Es por utf-8 como lo podria arreglar?