Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function clearText(thefield){
- if (thefield.defaultValue==thefield.value)
- thefield.value = ""
- }
- </script>
- <?php
- if (isset($_REQUEST['email']))
- {
- $email = $_REQUEST['email'] ;
- $other = $_REQUEST['victoms_email'];
- $subject = $_REQUEST['subject'] ;
- $message = $_REQUEST['message'] ;
- mail("$other", "$subject",
- $message, "From:" . $email);
- echo "Thank you for using our mail form!";
- }
- else
- {
- echo "<form method='post' action='email.php'>";
- echo "<table><tr><td>";
- echo "Email:</td><td> <input name='email' type='text' value='Enter Your Email Address' onFocus='clearText(this)' /></td></tr><tr><td>";
- echo "Other Persons Email:</td><td><input name='victoms_email' type='text' value='Enter Other Persons Email' onFocus='clearText(this)' /></td></tr><tr><td>";
- echo "Subject:</td><td> <input name='subject' type='text' value='Enter The Subject' onFocus='clearText(this)' /></td></tr><tr><td>";
- echo "Message:</td></tr></table>";
- echo "<textarea name='message' rows='3' cols='40' value='Enter Message Here' onFocus='clearText(this)'>
- </textarea><br />
- <input type='submit' />
- </form>";
- }
- ?>
Add Comment
Please, Sign In to add comment