get data list from the database: foreach ($rowset as $key => $value) { $colorrange=str_split($value->id); $findend=end($colorrange); $response[$key]['color'] = $this->get_color($findend); } function to get color: public function get_color($finden
I am upgrading my Ubuntu server and installing latest version of PHP i.e PHP 7.0.18, MongoDB 3.2.14, CodeIgniter v 2.2. Now when I am trying to connect with Mongo through CodeIgniter I am getting error as: The MongoDB PECL extension has not been inst
I want to update a multiple row using $this->db->update_batch('mytable', $data); But Don't Know How to give condition in this update_batch. Can I use this where? $this->db->where('id', Multiple Ids Here); i have code that is different from you
I made breadcums automatically on CodeIgniter but, on the user profile editing view, my uuid is shown as uri->segment. I think It will look cleaner without the uuid. How can I skip, delete or hide it? MY url http://localhost/myproject/user/edit/00040
I want to create a label sticker with barcode in PDF. Please give me the suggestion to create this things. Now , I use CI3 and dompdf. I have tried googling a lot of time, but I am not found the best practice to realized this thing. I followed your s
I'm practicing Codeigniter framework using a small project from my friends. Each pages need to load layout view and content view separately. The layout show users login info (logged or not, name, picture, etc.). The question is, how to show login inf
am doing this thing to get the values of the database, i am using this all the time but now i am getting this error. this one is working on every module i made but isnt working on my module, why is it? the error is, Severity: Notice Message: Trying t
I would like to shorten my CodeIgniter controller a bit. Now it looks like this: case 'klant1': $data['title'] = $page; $this->load->view('templates/header', $data); $this->load->view('pages/klant1', $data); $this->load->view('templates/
I am left joining 4 tables to get SUM of the amount that is present in first table. So far, I've tried many alternatives to get the sum straight, but either it becomes 0 (if I group_by), or duplicates, if I don't use group_by. here is my code: $this-
I am having a problem when searching the database for utf8 enocded strings in MySQL. I have a kind of a social website with users and they are allowed to add descriptions for their profile and because in my country we use cyrillic alphabet the obviou
I have model code function in Codeigniter like below, if me sort order by RAND() can display all item but if order by field name like part_no can't display all item, in next page same display with page 1. Model function listProductPerCategory($id, $l
Hello i am facing the problem of Allowed memory size error. I have created the project in codeigniter, php and I have used Tbs library. Its worked fine but today it display the error: Fatal error: Allowed memory size of 67108864 bytes exhausted (trie
I'm new to codeIgnitor and I'm trying to learn it by myself. but when I followed the specific instruction from this tutorial [http://www.codeigniter.com/user_guide/tutorial/news_section.html][1] this is my DB config $db['default'] = array( 'dsn' => '
I have a main website (example.com). I use CodeIgniter framework there. I will also use some different subfolders like example.com/sub1, example.com/sub2. I am using Laravel framework here and those will be completely different from example.com and s
I have web application about tour and travel, In my website i have a map using Google Maps API V3. I am using CodeIgniter for Developing my web and to show Google Maps API V3 Iam using Google maps library from biostall.com. I founded to show multiple
I can not delete user in codeigniter, When i click link to delete, it not working. It's a series on tutlus: Build a CMS in CodeIgniter. link delete: /admin/user/delete/3 Controller: class User extends Admin_Controller{ public function __construct() {
I have the below tables CREATE TABLE IF NOT EXISTS `maintrequests` ( `id` int(11) NOT NULL AUTO_INCREMENT, `propID` int(11) DEFAULT NULL, `landlordID` int(11) NOT NULL, `subject` varchar(45) DEFAULT NULL, `message` varchar(200) DEFAULT NULL, `status`
iam back with another question to do with mvc and codeigniter. just getting a bit confused with the concept of MVC. First of all i have a button. i want it to reference another page. how i was going to access the next "view" or page was from thi
I am trying to design a login/logout page in codeigniter framework.My problem is that when I logout of the web-page I am getting redirected to a login page. When I go back I am getting a page which says: Document Expired This document is no longer av
I have the following code and I need to have the id of the post in jquery! please help me in this. foreach($posts->result() as $post){ echo "<div class='post' id='$post->id' >"; echo $post->content; echo "<div class='comme
//here is my function block public function create_accnt() { $post = $this->input->post(); //gets all possible posts in array form echo "Post array: ";print_r($post); // just to make sure that my array has values $data = array( 'userid' =&
I am trying to implement captcha functionality using codeigniter. But it is not displaying captcha images. Here is my code : //Controller file : captcha.php <?php class Captcha extends CI_Controller { var $controller = "captcha"; var $viewCon
<script type="text/javascript" language='javascript'> $('#view_comment').submit(function() { alert("msg"); var sec={'post_id_for_view_comment' : $("#post_id_for_view_comment").val()} $.ajax({ url: "<?php echo ba
I have developed a CMS and when user forgets his/her password / the system will generate a new random password and send it to the user through email but when i open the email it automatically strip some character from my email body replacing them wit
I have a simple image upload form on my website where users can upload multiple images at once. I want to have my images organized in folder based on the month and year in the following format: MONTH-YEAR, so each time new upload starts I first check
Im having a problem comparing dates in a database to a week from now using activerecord. I'm trying to return a list of events with their start date less than a week from now. The event_start_date is in the format of 2011-06-30 09:00:00 $this->db->s
I am looking for a flexible, easy customized, Userlevel access and secure Authentication library that I can quickly get started with. I was looking at Stackoverflow and read about a few Authentication libraries but these posts were posted in 2010. Wh
I'm in the process of building a rather big web application with PHP + Codeigniter. When I first began this project I was excited by the hosting provider PHPFog product of PHP-as-a-service. The idea of simply developing my application and not having
is any way to post the image object to php file using javascript that can be alternative for the regular way of uploading image using (enctype="multipart/form-data") ? I had successfully post values of input text boxes using ajax, any way to pos
Wildcards are cool. I am trying to do this: $route["(:any)/controller"] = "controller"; basically, I want to put the wildcard in the front. It doesn't quite work, and I don't know any work around.Should work. If it doesn't try shufflin