EVOLUTION-NINJA
Edit File: show_industry_details.php
<?php namespace App\Controllers\flowD; use App\Controllers\BaseController; use CodeIgniter\RESTful\ResourceController; use CodeIgniter\API\ResponseTrait; use App\Models\exhibitionModel; class show_industry_details extends BaseController { use ResponseTrait; public function __construct() { helper(['form','url']); } public function index(){ $org_id = session()->get('org_id'); // print_r($org_id);die(); $exhibition_list = new exhibitionModel(); $exhibition_list->where('trend_active',0); $exhibition_details = $exhibition_list->findAll(); $data['details'] = $exhibition_details; $exhibition_list->where('trend_active',1); $trend_active = $exhibition_list->findAll(); $data['trend'] = $trend_active; // print_r($trend_active);die(); return view('flowD/add-industry',$data); } public function show_details(){ $id = $_GET['id']; $details = new exhibitionModel(); $details->where('id',$id); $shown_details = $details->find(); $data['show_data'] = $shown_details; $count = ($shown_details[0]['view_count']) + 1; $updatearr = array( 'view_count'=> $count ); $model = new exhibitionModel(); $model->set($updatearr); $model->where('id', $id); $insertID = $model->update(); // print_r($shown_details);die(); // echo 'hello'; return view('flowD/tech-about-page',$data); } } ?>