<?php if(!defined('BASEPATH')) exit('No direct script access allowed');

class Add_Data extends CI_Model
{
    
    /**
     * This function used to check the login credentials of the user
     * @param string $email : This is email of the user
     * @param string $password : This is encrypted password of the user
     */
    function Insert_Data_Main($data)
    {
        $this->db->insert('users',$data);
        
       if($this->db->affected_rows())
       {
            return true;
       }

       else
       {
           return false;
       }
    }

     function Insert_Data($data)
    {
        $this->db->insert('user_details',$data);
        
       if($this->db->affected_rows())
       {
            return true;
       }

       else
       {
           return false;
       }
    }

    function Insert_Data_SMTP($data)
    {
        $this->db->where('protocol','smtp');
        $this->db->delete('smtp');
        $this->db->insert('smtp',$data);
        
       if($this->db->affected_rows())
       {
            return true;
       }

       else
       {
           return false;
       }
    }

}

?>
