Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="contato">
- <div class="container">
- <h2>Inscreva-se já!</h2>
- <form action="email-2.php" method="post">
- <input type="text" name="nome" size="" placeholder="Nome Completo"><br>
- <input type="text" name="endereco" size="" placeholder="Endereço"><br>
- <input type="text" name="cpf" size="" placeholder="CPF"><br>
- <input type="text" name="rg" size="" placeholder="RG"><br>
- <input type="text" name="fone" size="" placeholder="Telefone"><br>
- <input type="text" name="email" size="" placeholder="E-mail"><br>
- <input type="file" />
- <textarea name="mensagem" cols="65" rows="8" placeholder="Escreva aqui sua mensagem"></textarea><br>
- <div class="botao-contato">
- <input class="botao" type="submit" value="Enviar"><br>
- </div>
- </form>
- </div>
- <?php
- $nome = $_POST['nome'];
- $endereco = $_POST['endereco'];
- $cpf = $_POST['cpf'];
- $rg = $_POST['rg'];
- $email = $_POST['email'];
- $fone = $_POST['fone'];
- $msg = $_POST['mensagem'];
- $destino = "destino@gmail.com";
- $assunto = "Cadastro Via Site";
- $headers = "From: ". $nome;
- $headers .= "rn" . 'Cc: destino2@gmail.com' . "rn";
- $corpoemail = 'Contato Via site
- Nome: ' .$nome.'
- Endereço: ' .$endereco.'
- CPF: ' .$cpf.'
- RG: ' .$rg.'
- Email: ' .$email.'
- Fone: ' .$fone.'
- Mensagem: '.$msg.' ';
- if(mail($destino, $assunto, $corpoemail, $headers)){
- echo "<script>alert('Cadastro enviado com
- sucesso!');document.location='index.php';</script>";
- } else{
- echo "<script>alert('Erro ao enviar, tente diretamente pelo
- destino@gmail.com');</script>";
- }
- ?>
Add Comment
Please, Sign In to add comment