Guest User

Untitled

a guest
Jan 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | None | 0 0
  1. <script>
  2. function clearText(thefield){
  3. if (thefield.defaultValue==thefield.value)
  4. thefield.value = ""
  5. }
  6. </script>
  7.  
  8. <?php
  9. if (isset($_REQUEST['email']))
  10.   {
  11.   $email = $_REQUEST['email'] ;
  12.   $other = $_REQUEST['victoms_email'];
  13.   $subject = $_REQUEST['subject'] ;
  14.   $message = $_REQUEST['message'] ;
  15.   mail("$other", "$subject",
  16.   $message, "From:" . $email);
  17.   echo "Thank you for using our mail form!";
  18.   }
  19. else
  20.   {
  21.   echo "<form method='post' action='email.php'>";
  22.   echo "<table><tr><td>";
  23.   echo "Email:</td><td> <input name='email' type='text' value='Enter Your Email Address' onFocus='clearText(this)' /></td></tr><tr><td>";
  24.   echo "Other Persons Email:</td><td><input name='victoms_email' type='text' value='Enter Other Persons Email' onFocus='clearText(this)' /></td></tr><tr><td>";
  25.   echo "Subject:</td><td> <input name='subject' type='text' value='Enter The Subject' onFocus='clearText(this)' /></td></tr><tr><td>";
  26.   echo "Message:</td></tr></table>";
  27.   echo "<textarea name='message' rows='3' cols='40' value='Enter Message Here' onFocus='clearText(this)'>
  28.  </textarea><br />
  29.  <input type='submit' />
  30.  </form>";
  31.   }
  32. ?>
Add Comment
Please, Sign In to add comment