Posts

Category Filter in Codeigniter

Image
Filter Products as per Category using Codeigniter 1.   Database  -- -- Table structure for table `category` -- CREATE TABLE `category` (   `c_id` int(11) NOT NULL,   `c_name` varchar(100) NOT NULL,   `c_status` int(1) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `category` -- INSERT INTO `category` (`c_id`, `c_name`, `c_status`) VALUES (1, 'JACKET', 1), (2, 'SHIRT', 1), (3, 'DRESS MATERIAL', 1); -- -------------------------------------------------------- -- -- Table structure for table `product` -- CREATE TABLE `product` (   `pid` int(11) NOT NULL,   `c_id` int(11) NOT NULL,   `ptitle` varchar(255) NOT NULL,   `status` int(11) NOT NULL DEFAULT '1' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `product` -- INSERT INTO `product` (`pid`, `c_id`, `ptitle`, `status`) VALUES (1, 1, 'jacket',

Sending email through G suite in Codeigniter

Image
Sending email through G suite in Codeigniter 1.  Load email library      $this->load->library('email'); 2. SMTP & mail configuration           $config = array(          'protocol' => 'mail',          'smtp_host' => 'ssl://smtp-relay.gmail.com',          'smtp_port' => 465,          'smtp_user' => ' YourGsuiteEmail ',          'smtp_pass' => ' YourGsuitePassword ',          'mailtype' => 'html',          'charset' =>'utf-8'     );           $this->load->library('email', $config);           $this->email->initialize($config);           $this->email->from($email);           $this->email->reply_to($to);           $this->email->to($to);           $this->email->to($ $this->email->subject($subject); 3.   Email content           $content = 'Na