Title: button ain&#039;t working
Last modified: August 20, 2016

---

# button ain't working

 *  Resolved [dmd54](https://wordpress.org/support/users/dmd54/)
 * (@dmd54)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/button-aint-working/)
 * Cheers – Having issues with a submit button not submitting.
 * help?
 * [http://seedtheearth.com](http://seedtheearth.com)
 * it’s the “send” button on the home page “free quote” form.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 6 months ago](https://wordpress.org/support/topic/button-aint-working/#post-3213900)
 * Could plugins be causing this?
 *  [Beee](https://wordpress.org/support/users/beee/)
 * (@beee)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/button-aint-working/#post-3213927)
 * you use this code
    `<form action="http://seedtheearth.com/wp-content/themes/JumpHigh/
   sendmail.php" method="post" id="quickContactForm">`
 * which is not a WordPress file, so I assume the error is in that specific file…
 *  Thread Starter [dmd54](https://wordpress.org/support/users/dmd54/)
 * (@dmd54)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/button-aint-working/#post-3213936)
 * Andrew – no plugins are activated. I am currently using this domain to host sites
   i’m working on.
 * Beee – that is a file in my theme folder. I have used this specific contact form
   in other sites before and haven’t encountered any errors.
 * thanks
 *  [Beee](https://wordpress.org/support/users/beee/)
 * (@beee)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/button-aint-working/#post-3213937)
 * can you post the contents of sendmail.php here (if not too big) ?
 *  Thread Starter [dmd54](https://wordpress.org/support/users/dmd54/)
 * (@dmd54)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/button-aint-working/#post-3213938)
 * Here is the sendmail php
 *     ```
       <?php
         		if(isset($_POST['submit'])) {
                 error_reporting(E_NOTICE);
                 function valid_email($str)
                 {
                 return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
       		     }
                 if($_POST['name']!='' && $_POST['email']!='' && valid_email($_POST['email'])==TRUE && strlen($_POST['comment'])>1)
                 {
                     $to = preg_replace("([\r\n])", "", hexstr($_POST['receiver']));
       			  $from = preg_replace("([\r\n])", "", $_POST['email']);
       			  $subject = "Website contact message from ".$_POST['name'];
                     $message = $_POST['comment'];
   
       			  $match = "/(bcc:|cc:|content\-type:)/i";
       				if (preg_match($match, $to) ||
       					preg_match($match, $from) ||
       					preg_match($match, $message)) {
       				  die("Header injection detected.");
       				}
                     $headers = "From: ".$from."\r\n";
          			  $headers .= "Reply-to: ".$from."\r\n";
   
               if(mail($to, $subject, $message, $headers))
                     {
                         echo 1; //SUCCESS
                     }
                     else {
                         echo 2; //FAILURE - server failure
                     }
                 }
                 else {
              	  echo 3; //FAILURE - not valid email
   
                 }
       		  }else{
       			 die("Direct access not allowed!");
       		   }
   
       		    function hexstr($hexstr) {
       				  $hexstr = str_replace(' ', '', $hexstr);
       				  $hexstr = str_replace('\x', '', $hexstr);
       				  $retstr = pack('H*', $hexstr);
       				  return $retstr;
       				}
   
             ?>
       ```
   
 *  Thread Starter [dmd54](https://wordpress.org/support/users/dmd54/)
 * (@dmd54)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/button-aint-working/#post-3213939)
 * All right. Appreciate the help but I decided to simplify and scrap this form 
   since it’s not working properly.
 * cheers.
 *  [Beee](https://wordpress.org/support/users/beee/)
 * (@beee)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/button-aint-working/#post-3213945)
 * ok, good luck…

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘button ain't working’ is closed to new replies.

## Tags

 * [button](https://wordpress.org/support/topic-tag/button/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [Beee](https://wordpress.org/support/users/beee/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/button-aint-working/#post-3213945)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
