betweenGo

WordPress Contact E-Mail Form

by on Mar.17, 2006, under WordPress

Naively, I put up email addresses for sales, information, and site feedback on the Contact Us page. The spam robots discovered these email addresses and have begun to spam me.

Fortunately there is a WordPress plugin, PXS Mail Form, for email forms that seems quite mature and even protects against exploits. You can see how it is used on this page.

I made only one change to this plugin that allows you to set the subject of the email form using a GET request. Previously you could only do this using a POST request.

***************
*** 58,69 ****
              } else {
              $show_subject = 1;
              $subject = '';
!             if (empty($_POST['your_subject'])) {
              $subject = get_option('pxs_subject');
              $subject = stripslashes($subject);
              $subject_mm = '';
              } else {
!             $subject = $_POST['your_subject'];
              $subject = stripslashes($subject);
              $subject_mm =  ': '.$subject;
              }
--- 58,69 ----
              } else {
              $show_subject = 1;
              $subject = '';
!             if (empty($_REQUEST['your_subject'])) {
              $subject = get_option('pxs_subject');
              $subject = stripslashes($subject);
              $subject_mm = '';
              } else {
!             $subject = $_REQUEST['your_subject'];
              $subject = stripslashes($subject);
              $subject_mm =  ': '.$subject;
              }


Share

Related posts:

  1. Forwarding instead of Redirecting in Form Handlers
  2. Submitting an ATG Form Using a Text Link
  3. WordPress and Gallery2
  4. Internet Explorer form does not invoke ATG handler
  5. WordPress fun

:

Leave a Reply

 

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!