Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- class Contact extends CI_Controller {
- function index () {
- $data = array('title' => 'Request Assistance', 'main_content' => 'pages/contact');
- $this->load->view('template/main', $data);
- }
- function sendFacilityForm () {
- $name = $this->input->post('name');
- $email = $this->input->post('email');
- $inquiry = $this->input->post('inquiry');
- $this->email->from('xxx@xxx.org', 'Clay Beyer');
- $this->email->to($email);
- $this->email->subject('Facility Manager has a new Message!');
- $this->email->message($inquiry);
- if($this->email->send()) {
- $data = array('title' => 'Form Submitted', 'main_content' => 'pages/formSuccess');
- $this->load->view('template/main', $data);
- }
- else {
- show_error($this->email->print_debugger());
- }
- }
- }
- /*End of file contact.php*/
- /*Location .application/controllers/contact.php*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement