Downloaded a template, can’t figure out the contact form.
HTML is this:
[php]
<div id="response">
</div>
</form>
[/php]
And PHP is this:
[php]
Please enter your name
'; $this->response_status = 0; } // Check email if(!$this->email) { $this->response_html .= 'Please enter an e-mail address
'; $this->response_status = 0; } // Check valid email if($this->email && !$this->validateEmail()) { $this->response_html .= 'Please enter a valid e-mail address
'; $this->response_status = 0; } // Check message length if(!$this->message || strlen($this->message) < $this->message_min_length) { $this->response_html .= 'Please enter your message. It should have at least '.$this->message_min_length.' characters
'; $this->response_status = 0; } } private function sendEmail(){ $mail = mail($this->email_admin, $this->subject, $this->message, "From: ".$this->name." <".$this->email.">\r\n" ."Reply-To: ".$this->email."\r\n" ."X-Mailer: PHP/" . phpversion()); if($mail) { $this->response_status = 1; $this->response_html = 'Thank You!
'; } } function sendRequest(){ $this->validateFields(); if($this->response_status) { $this->sendEmail(); } $response = array(); $response['status'] = $this->response_status; $response['html'] = $this->response_html; echo json_encode($response); } } $contact_form = new Contact_Form($_POST, $admin_email, $message_min_length); $contact_form->sendRequest(); ?>[/php]
[size=10pt][size=12pt]I just need it to be sent to my email address when you click the ‘Submit’ button after completing the form.[/size][/size]