Posted By

jonhenshaw on 10/12/07


Tagged

form email message


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

vali29
jonhenshaw
Bluewall


Email Form to Send Message on Web Page


 / Published in: PHP
 

URL: http://www.ibdhost.com/contact/

Step 1: Copy and paste the e-mail Form Code into a 'contact.php' page (must be a html/php page on a server that allows php!).

Step 2: Copy n paste the sendeail.php code into a new file. Change the YourEmail section to include your email address. Then check (or modify) the link at the bottom (contact.php) to point to the desired Next Page. Save the file as 'sendeail.php' (as ASCII file).

Step 3: Upload both files as ASCII i.e. upload the same way as .html files. Be sure both files are in the same folder on the server.

  1. <form method="post" action="sendeail.php">
  2.  
  3. <!-- DO NOT change ANY of the php sections -->
  4. <?php
  5. $ipi = getenv("REMOTE_ADDR");
  6. $httprefi = getenv ("HTTP_REFERER");
  7. $httpagenti = getenv ("HTTP_USER_AGENT");
  8. ?>
  9.  
  10. <input type="hidden" name="ip" value="<?php echo $ipi ?>" />
  11. <input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
  12. <input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
  13.  
  14.  
  15. Your Name: <br />
  16. <input type="text" name="visitor" size="35" />
  17. <br />
  18. Your Email:<br />
  19. <input type="text" name="visitormail" size="35" />
  20. <br /> <br />
  21. <br />
  22. Attention:<br />
  23. <select name="attn" size="1">
  24. <option value=" Sales n Billing ">Sales n Billing </option>
  25. <option value=" General Support ">General Support </option>
  26. <option value=" Technical Support ">Technical Support </option>
  27. <option value=" Webmaster ">Webmaster </option>
  28. </select>
  29. <br /><br />
  30. Mail Message:
  31. <br />
  32. <textarea name="notes" rows="4" cols="40"></textarea>
  33. <br />
  34. <input type="submit" value="Send Mail" />
  35. <br />
  36. Free Code at: <a href="http://www.ibdhost.com/contact/">ibdhost.com/contact/</a>
  37. </form>

Report this snippet  

You need to login to post a comment.