Advertisement
Guest User

Untitled

a guest
Apr 21st, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. // In insert function in controller paste this code after addedd successfully in database ...
  2.  
  3. $response=$this->Master_model->save_doctor_details_data();
  4. if($response>0)
  5. {
  6.  
  7. $this->session->set_flashdata('Success', 'Doctor Added Successfully...');
  8.  
  9.  
  10.  
  11. echo $email=$this->input->post('email_address');
  12. echo $username=$this->input->post('mobile_number');
  13. echo $password=$this->input->post('mobile_number');
  14.  
  15. $from="admin";
  16. $name="Hospitalo";
  17. $to= $email;
  18. $subject ="Hospitalo Username and Password ";
  19. $message = "Your Doctor Registration is Successfull, and Your Username is : ".$username." and Password is : ".$password;
  20.  
  21. echo "mailresult=".$mailresult =$this->sendMail($from,$name,$to,$subject,$message);
  22.  
  23.  
  24. }
  25.  
  26. // call send mail function outside the function
  27. as code ...
  28.  
  29. public function sendMail($from,$name,$to,$subject,$message)
  30. {
  31. $this->email->from($from, $name);
  32. $this->email->to($to);
  33. $this->email->cc($cc);
  34. $this->email->set_mailtype('html');
  35. $this->email->subject($subject);
  36. $this->email->message($message);
  37. $this->email->send();
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement