Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // In insert function in controller paste this code after addedd successfully in database ...
- $response=$this->Master_model->save_doctor_details_data();
- if($response>0)
- {
- $this->session->set_flashdata('Success', 'Doctor Added Successfully...');
- echo $email=$this->input->post('email_address');
- echo $username=$this->input->post('mobile_number');
- echo $password=$this->input->post('mobile_number');
- $from="admin";
- $name="Hospitalo";
- $to= $email;
- $subject ="Hospitalo Username and Password ";
- $message = "Your Doctor Registration is Successfull, and Your Username is : ".$username." and Password is : ".$password;
- echo "mailresult=".$mailresult =$this->sendMail($from,$name,$to,$subject,$message);
- }
- // call send mail function outside the function
- as code ...
- public function sendMail($from,$name,$to,$subject,$message)
- {
- $this->email->from($from, $name);
- $this->email->to($to);
- $this->email->cc($cc);
- $this->email->set_mailtype('html');
- $this->email->subject($subject);
- $this->email->message($message);
- $this->email->send();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement