Advertisement
Guest User

form_envia_contact

a guest
Feb 18th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.67 KB | None | 0 0
  1. <?php
  2.     $name = $_POST['name'];
  3.     $email = $_POST['email'];
  4.     $message = $_POST['message'];
  5.     $from = "De: Contato Site";
  6.     $to = "email@email.com.br";
  7.     $subject = "Contato Site";
  8.     $enviamail ='mail ($to, $subject, $body, $from)';
  9.     $body = "De: $name<br> E-Mail: $email<br> <p>Mensagem:<br> $message</p>";
  10.  
  11.     if ($_POST['submit']) {
  12.                 if ($enviamail) {      
  13.                         echo "<!DOCTYPE HTML>";
  14.                         echo "<html>";
  15.                         echo "<head>";
  16.                         echo "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>";
  17.                         echo "<title>Titulo</title>";
  18.                         echo "<link type='text/css' rel='stylesheet' href='estilo.css'>";
  19.                         echo "</head>";
  20.                         echo "<body>";
  21.                         echo "  <a href='http://website.in/'><img src='images/logo.jpg' alt='logo' class='logo' border=0></a><br>   ";
  22.                         echo "  <header class='body'>";
  23.                         echo "          <div>";
  24.                         echo "                  <h1>Obrigado pelo contato!</h1>";
  25.                         echo "          </div>";
  26.                         echo "    </header>";
  27.                         echo "    <footer class='body'>";
  28.                         echo "    </footer>";
  29.                         echo "</body>";
  30.                         echo "</html>";        
  31.                 }
  32.                 else {
  33.                         echo "<p>Algo deu errado, volte e tente novamente!</p>";
  34.                         echo "<a href='http://site.in/'>Voltar</a>";
  35.                 }
  36.     }
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement