SHARE
TWEET

Untitled

a guest Jul 22nd, 2014 317 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $action=$_REQUEST['action'];
  3. if ($action=="")
  4.     {
  5.     ?>
  6.     <form  action="" method="POST" enctype="multipart/form-data">
  7.     <input type="hidden" name="action" value="submit">
  8.     Your name:<br>
  9.     <input name="name" type="text" value="" size="30"/><br>
  10.     Your email:<br>
  11.     <input name="email" type="text" value="" size="30"/><br>
  12.     Your message:<br>
  13.     <textarea name="message" rows="7" cols="30"></textarea><br>
  14.     <input type="submit" value="Send email"/>
  15.     </form>
  16.     <?php
  17.     }
  18. else
  19.  
  20.  
  21.  
  22.  
  23.     {
  24.        
  25.        
  26.        
  27.        
  28.     $name=$_REQUEST['name'];
  29.     $email=$_REQUEST['email'];
  30.     $message=$_REQUEST['message'];
  31.     if (($name=="")||($email=="")||($message==""))
  32.         {
  33.         echo "All fields are required, please fill <a href=\"\">the form</a> again.";
  34.         }
  35.                
  36.                
  37.     else{        
  38.         $from="From: $name<$email>\r\nReturn-path: $email";
  39.         $subject="Message sent using your contact form";
  40.         mail("SKIDS-EMAIL-HERE-MHHHHHHK@email.com", $subject, $message, $from);
  41.         echo "Email sent!";
  42.         }
  43.     }  
  44. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top