Welcome Guest, Not a member yet? Register   Sign In
Form is ignoring where I am trying to send it
#3

[eluser]Bruno43[/eluser]
function send(){
$this->load->library('form_validation');

$this->form_validation->set_rules('name', 'Name', 'trim|required');
$this->form_validation->set_rules('email', 'Email Address', 'trim|required|valid_email');
$this->form_validation->set_rules('company', 'Company', 'trim');
$this->form_validation->set_rules('comment', 'Comment', 'trim|required');

if($this->form_validation->run() == FALSE){
$this->index();
}else{
$name = $this->input->post('name');
$email = $this->input->post('email');
$comment = $this->input->post('comment');

$this->load->library('email');
$this->email->set_newline("\r\n");

$this->email->from($email, $name);
$this->email->to('[email protected]');
$this->email->cc('[email protected]');
$this->email->subject('Contact Form from Site');
$this->email->message($comment);


if($this->email->send()){
$data['main_content'] = 'confirmation_view';
$this->load->view('includes/template', $data);
}else{
show_error($this->email->print_debugger());
}
}
}


Messages In This Thread
Form is ignoring where I am trying to send it - by El Forum - 04-15-2010, 12:21 PM
Form is ignoring where I am trying to send it - by El Forum - 04-15-2010, 12:37 PM
Form is ignoring where I am trying to send it - by El Forum - 04-15-2010, 12:47 PM
Form is ignoring where I am trying to send it - by El Forum - 04-15-2010, 10:35 PM
Form is ignoring where I am trying to send it - by El Forum - 04-16-2010, 10:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB