how to fix with this error A PHP Error was encountered, I have got a similar reference but still failed. I need a solution? [on hold]

49
April 16, 2019, at 11:50 AM

How to fix this error, i create apps for hospital with codeigniter, I have downgraded xampp from version 7.1 to 5.6.40 and I have got a similar reference but still failed to run. I need a solution?

error error is located in the controllers section> Welcome.php

Error running https://prnt.sc/nchqr1

error line 132 https://prnt.sc/nchro4

<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Welcome extends CI_Controller {

function __construct(){
    parent::__construct();
    $this->load->helper('url');
    $this->load->model('Model1');
    $this->load->helper('form');
}

public function index()
{
    $ambil = array(
                    "header" => $this->con_header(),
                    "yourhead" => $this->con_head(),
                    "badanya" => $this->con_badan(),
                    "yoursikil" => $this->con_foot(),
                );
    $this->load->view('utama_clinicalpathway',$ambil);
}
/* Start Controller Template New Clinical Pathway */
public function con_header()
{
    $awal = array();
        return $this->load->view("template/header",$awal,true);
}
public function con_head()
{
    $jikok = array();
        return $this->load->view("template/head",$jikok,true);
}
public function con_badan()
{
    $pek = array();
        return $this->load->view("template/badan",$pek,true);
}
public function con_foot()
{
    $mundut = array();
        return $this->load->view("template/foot",$mundut,true);
}
/* End Controller Template New Clinical Pathway */

/====================================================================/ /* Start Controller pembentukan indikator abortus imminens */

public function cari_abortusimminens(){
    if (isset($_POST['q'])) {
        $data['ringkasan'] = $this->input->post('cari');
        // session userdata utk pencarian, utk page cari
        $this->session->set_userdata('sess_ringkasan', $data['ringkasan']);
    }
    else {
        $data['ringkasan'] = $this->session->userdata('sess_ringkasan');
    }
    $this->db->like('pasien_masuk', $data['ringkasan']);
    $this->db->from('abortus_imminens');
    //page limit
    $pagination['base_url'] = base_url(). 'index.php/Welcome/cari_abortusimminens/';
    $pagination['total_rows'] = $this->db->count_all_results();
    $pagination['full_tag_open'] = "<p><div class=\"pagination\" style='letter-spacing:2px;'>";
    $pagination['full_tag_close'] = "</div></p>";
    $pagination['cur_tag_open'] = "<span class=\"current\">";
    $pagination['cur_tag_close'] = "</span>";
    $pagination['num_tag_open'] = "<span class=\"disabled\">";
    $pagination['num_tag_close'] = "</span>";
    $pagination['per_page'] = "93";
    $pagination['uri_segment'] = 4;
    $pagination['num_links'] = 5;
    $this->pagination->initialize($pagination);
    $data['ListBerita'] =$this->model1->cari_abortusimminens($pagination['per_page'], $this->uri->segment(4,0),$data['ringkasan']);
    $this->load->vars($data);
    $this->load->view('abortusimminens/cari_abortusimminens');
}
public function add_abortusimminens()
{
    return $this->load->view("abortusimminens/add_abortusimminens");
}
public function view_abortusimminens()
{
    return $this->model1->view("abortusimminens/view_abortusimminens",array('ambil' => $b));
}
public function lap_excel_abortusimminens()
{
    //fungsi header utk ambil file jadi excel
    header("Content-type: application/vnd-ms-excel");
        header("Content-Disposition: attachment; filename=abortusimminens.xls");
    if (isset($_POST['q'])) {
        $data['ringkasan'] = $this->input->post('cari');
        // se session userdata untuk pencarian, untuk paging pencarian
        $this->session->set_userdata('sess_ringkasan', $data['ringkasan']);
    }
    else {
        $data['ringkasan'] = $this->session->userdata('sess_ringkasan');
    }
    $this->db->like('pasien_masuk', $data['ringkasan']);
    $this->db->from('abortus_imminens');
    //page limit
    $pagination['base_url'] = base_url(). 'index.php/Welcome/cari_abortusimminens/';
    $pagination['total_rows'] = $this->db->count_all_results();
    $pagination['full_tag_open'] = "<p><div class=\"pagination\" style='letter-spacing:2px;'>";
    $pagination['full_tag_close'] = "</div></p>";
    $pagination['cur_tag_open'] = "<span class=\"current\">";
    $pagination['cur_tag_close'] = "</span>";
    $pagination['num_tag_open'] = "<span class=\"disabled\">";
    $pagination['num_tag_close'] = "</span>";
    $pagination['per_page'] = "93";
    $pagination['uri_segment'] = 4;
    $pagination['num_links'] = 5;
    $this->pagination->initialize($pagination);
    $data['ListBerita'] =$this->model1->cari_abortusimminens($pagination['per_page'], $this->uri->segment(4,0),$data['ringkasan']);
    $this->load->vars($data);
    $this->load->view('abortusimminens/excel_abortusimminens');
}
public function insert_abortusimminens(){
    $nama_pasien = $_POST['nama_pasien'];
    $Umur = $_POST['Umur'];
    $Berat_Badan_(kg) = $_POST['Berat_Badan_(kg)'];
    $Tinggi_Badan_(cm) = $_POST['Tinggi_Badan_(cm)'];
    $NoRM = $_POST['NoRM'];
    $diagnosis_awal = $_POST['diagnosis_awal'];
    $kode_ICD_10 = $_POST['kode_ICD_10'];
    $ruang_rawat = $_POST['ruang_rawat'];
    $kelas = $_POST['kelas'];
    $pasien_masuk = $_POST['pasien_masuk'];
    $penyakit_utama = $_POST['penyakit_utama'];
    $penyakit_penyerta = $_POST['penyakit_penyerta'];
    $komplikasi = $_POST['komplikasi'];
    $data_insert = array(
        'nama_pasien' => $nama_pasien,
        'Umur' => $Umur,
        'Berat_Badan_(kg)' => $Berat_Badan_(kg),
        'Tinggi_Badan_(cm)' => $Tinggi_Badan_(cm),
        'NoRM' => $NoRM,
        'diagnosis_awal' => $diagnosis_awal,
        'kode_ICD_10' => $kode_ICD_10,
        'ruang_rawat' => $ruang_rawat,
        'kelas' => $kelas,
        'pasien_masuk' => $pasien_masuk,
        'penyakit_utama' => $penyakit_utama,
        'penyakit_penyerta' => $penyakit_penyerta,
        'komplikasi' => $komplikasi,
    );
    $letsgo = $this->model1->add_abortusimminens('abortus_imminens',$data_insert);
    if($letsgo>=1){
        $this->session->set_flashdata('ambil_pesan','Terimakasih, Data berhasil ditambah');
        redirect('Welcome/view_abortusimminens');
    }else{
            echo "Data Gagal Di tambahkan";
    }
}
public function del_abortusimminens($del){
    $where = array('nama_pasien' => $del);
    $letsgo = $this->model1->deleteabortusimminens('abortus_imminens',$where);
    if($letsgo>=1){
        $this->session->set_flashdata('ambil_pesan',':(, Berhasil hapus data');
        redirect('Welcome/view_abortusimminens');
    }
}

}

READ ALSO
How to read soap response header

How to read soap response header

Getting response from one of the soap function php, after that sending this response as a parameter to another soap request, that time I need to extract the set-cookie from the previous response header here below my response headerI need to read set-cookie...

30
PHP debug recursion

PHP debug recursion

I have a problem when I want to add debugging for recursion to send me the backtrace to show in which file an error occured (I'm not able to debug because the code is on another server)

30
What is the PDO equivalent of function mysql_real_escape_string?

What is the PDO equivalent of function mysql_real_escape_string?

I am modifying my code from using mysql_* to PDOIn my code I had mysql_real_escape_string()

53
How to detect emoji in plain text with PHP Preg_Match? REGULAR [E-XX]

How to detect emoji in plain text with PHP Preg_Match? REGULAR [E-XX]

I want to change the expressions in the form [E-01] - [E-02] - [E-03] - [E-04]

39