Posts

crud operation in codeigniter

Download File Controller: function subitem(){ if($this->session->userdata('username')){ $id=$this->uri->segment(3); if($this->input->post('Submit')){ $data=array( 'subitem_itemname'=>$this->input->post('miname'), );//print_r($data);die();   $this->Item_model->insert_subitem($data); }elseif($this->input->post('Update')){ $data=array( 'subitem_id'=>$this->input->post('subitem_id'), 'subitem_itemname'=>$this->input->post('miname'), ); //print_r($data);die(); $this->Item_model->update_subitem($data); }elseif($id){ $data=array( 'subitem_id'=>$id, 'subitem_active'=>0 ); $this->Item_model->delete_subitem($data); } $data['view_item']=$this->Item_model->view_item(); $data['view_itemoption'

Push Notification in Android using Firebase (FCM) and PHP

Creating PHP Project 1.  Start WAMP/XAMPP server and navigate to  www  or  htdocs  folder and create a folder named  firebase  inside it. Inside this folder, create a subfolder called  notifications 2.  Now create a file named  notification.php  inside  notifications  folder. This will have Notification class which will help in constructing the notification data payload. notification.php PHP 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 <?php class Notification { private $title ; private $message ; private $image_url ; private $action ; private $action_destination ; private $data ; function __construct ( ) {          } public function setTitle ( $title ) { $this -> title = $title ; } public functi