Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. public function registration_post(){
  2.  
  3. $jsonArray = json_decode(file_get_contents('php://input'),true);
  4. $user_name = $jsonArray['user_name'];
  5. $email = $jsonArray['email'];
  6. $password = $jsonArray['password'];
  7.  
  8. $result = $this->reg_model->insert_api($user_name,$email,$password);
  9. if ($result){
  10. $this->load->library('email');
  11. $from_email = "abc@gmail.com";
  12. $this->email->from($from_email, 'Name');
  13. $this->email->to($email);
  14. $this->email->subject('email subject');
  15. $message = 'email body';
  16. $this->email->message($message);
  17. $this->email->send();
  18. $data = $this->response($this->reg_model->get($user_name));
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement