Created
April 24, 2014 07:04
-
-
Save martisj/11244399 to your computer and use it in GitHub Desktop.
email validation form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function request_a_demo() { | |
$data = array(); | |
$data['for_universities_section'] = TRUE; | |
$this->form_validation->set_rules('name', 'Name', 'trim|required'); | |
$this->form_validation->set_rules('institution', 'University/College', 'trim|required'); | |
$this->form_validation->set_rules('position', 'Position', 'trim|required'); | |
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email'); | |
if ($this->form_validation->run() == FALSE) | |
{ | |
$this->template->set_layout('public')->build('home/request_a_demo', $data); | |
} | |
else | |
{ | |
die(var_dump($_POST)); | |
$this->template->set_layout('public')->build('home/request_a_demo_sent', $data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment