Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function regvalidation()
- {
- $this->load->library('form_validation');
- $this->form_validation->set_rules('email','email','required|trim|valid_email|is_unique[user_admin.username]');
- $this->form_validation->set_rules('password','Password','required|trim');
- $this->form_validation->set_rules('c_password','Confirm Password','required|trim|matches[password]');
- if ($this->form_validation->run())
- {
- $this->load->library('email');
- $key = md5(uniqueid());
- //echo $this->input->post('email');
- $this->email->from('edgemaster@edge.xyz','Edge Master');
- $this->email->to($this->input->post('email'));
- $this->email->subject("EDGE | Confirm your account");
- $message = "<p>Thank you for signing up</p>";
- $message .= "<p><a href='".base_url()."main/register_user/".$key.">Click here</a>to confirm your account.</p>";
- $this->email->message($message);
- $this->email->send();
- if ($this->email->send())
- {
- echo "This email has been sent.";
- }
- else
- {
- echo "failed.";
- }
- }
- else
- {
- $this->load->view('signup.php');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement