Category : codeigniter

I have my Codeigniter application running in htdocs ==> htdocs/ciapp And core php application also in htdocs ==> htdocs/coreapp Both apps are using a single MySQL DB User lands on ciapp and login there, Afterwards, the user goes to coreapp and also login there. Authentication is done from the same user table (using the same ..

Read more

Here is my code, How we translate the Swal String into English? Best way for Translating? Thankyou in Advance. function send_message() { var message = $(‘#message’).val(); if (message == ”) { **swal(‘Veuillez écrire un texte’);** } else { $.ajax({ url: site_url + "customer/add_message/", type: ‘POST’, data: { message: message, owner_id: ‘<?php echo $property->owner_id; ?>’, project_id: ..

Read more

We have generated stream id but when we pass stream id to getstream function then we are getting domain exception error. I have attached following code… public function index1(){ $opentok = new OpenTok($this->config->item(‘opentok_key’), $this->config->item(‘opentok_secret’)); $sessionId = "1_MX40NOTI2NH5-MTYzMjQ4MDI5MDY1Nn5tNTg0aHpSRjdoTTdDb1pHUDNKYUZuSGR-fg"; $streamId = "cf91b5ac-f995-4f77-9c5a-23cf14325720"; // print_r($streamId); exit(); $stream = $opentok->getStream($sessionId, $streamId); // print_r($stream); exit(); // // Stream properties // ..

Read more

I want to display data in different sections, but error when I run. enter image description here Controller class Dfkamar extends CI_Controller { public function index() { $data[‘tamu’] = $this ->m_tamu->daftar_kamar()->result(); $this->load->view(‘templates/header’); $this->load->view(‘templates/sidebar’); $this->load->view(‘dfkamar’, $data); $this->load->view(‘templates/footer’); } View <?php foreach ($tamu as $tamu) : ?> <button type="button" class="btn btn-success"><?php echo $tamu->gateA ?></button> </div> <?php endforeach;?> ..

Read more

I’m having this error in my hosted website, i didn’t found any white space or missing closing tags in my controllers, anyone can help ? thx in advance FATAL ERROR: UNCAUGHT ERROREXCEPTION: CANNOT MODIFY HEADER INFORMATION – HEADERS ALREADY SENT BY (OUTPUT STARTED AT /HOME/WDLRSRFL/FRAMEWORK/APP/CONFIG/EVENTS.PHP:33) IN /HOME/WDLRSRFL/FRAMEWORK/SYSTEM/DEBUG/EXCEPTIONS.PHP:164 STACK TRACE: #0 [INTERNAL FUNCTION]: CODEIGNITERDEBUGEXCEPTIONS->ERRORHANDLER(2, ‘CANNOT MODIFY ..

Read more

I have a select query in Codeignter as below: $this->db->select("*"); $this->db->from("table_name"); $query = $this->db->get(); $data = $query->result(); In the table, there are two columns for timestamp, ‘created_at’ and ‘updated_at’, with a default format of YYYY-MM-DD hh:mm:ss. Now I want to return $data from function with modified timestamp format (DD-MM-YYYY hh:mm:ss) for each row and each ..

Read more

i have a codeigniter website where am trying to add data to another website using its api, my controller is like below: public function teamx(){ $data = array(); if($this->isUserLoggedIn){ $con = array( ‘id’ => $this->session->userdata(‘userId’) ); $this->load->view(‘teamx’, $data); } else{ redirect(‘login’); } } in the targets website they gave some details like below, URL https://portal.teamex.ae/webservice/CustomerBooking ..

Read more