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

class Insert_OTP_Model extends CI_Model
{
     function Insert_OTP($data)
    {
       $this->db->insert('otp',$data);
        
       if($this->db->affected_rows())
       {
            return true;
       }

       else
       {
           return false;
       }
    }

    function Update_OTP($cid,$data)
    {
        $this->db->where('id', $cid);
        $this->db->delete('otp');

        if(($this->db->affected_rows())>0)
        {     
            $this->db->insert('otp',$data);

            if($this->db->affected_rows())
            {
                return true;
            }
            
            else
            {
                echo "not done otp";
            }
        }

       else
       {
           echo "not done otpsssssssssss"."<br>"."<br>"."<br>";
           return false;
       }
    }

}

?>
