Questions tagged [codeigniter-2]

CodeIgniter 2.x is an old and no longer supported version of the popular PHP framework. Please refer to the [codeigniter] tag for more information.

Codeigniter 2.x is an old and no longer supported version of the popular PHP framework.

The last 2.x version (2.2.6) was released on October 31st, 2015, which is also the date when security maintenance support for the 2.x version tree was officially ended.

For more up-to-date information on the Codeigniter framework, please refer to the tag.

Links:

3146 questions
0
votes
1 answer

code igniter controller uri segment

i'm trying to get the segment depth that triggered the controller inside my controller. for example: i have controllers/data/something.php class Something extends CI_Controller { public function index() { $depth = ???; // should be…
galchen
  • 5,252
  • 3
  • 29
  • 43
0
votes
2 answers

Cannot get DataMapper to work in CodeIgniter

I'm trying to implement an ORM in a CodeIgniter application, but cannot get it to work. To start I'm just trying to instantiate a simple test model:
Anders
  • 12,556
  • 24
  • 104
  • 151
0
votes
3 answers

More than max_user_connections in CodeIgniter app?

I'm getting what looks like rather serious database errors in my CodeIgniter application. In the log file it says: User anders already has more than 'max_user_connections' active connections And there are several hundred of those lines... I've read…
Anders
  • 12,556
  • 24
  • 104
  • 151
0
votes
1 answer

Load xml file in php and CodeIgniter

I'm trying to use the XML DOM in CodeIgniter, but I can't load the xml document. I'm not sure I understand CodeIgniter well enough yet, but I guess there's some problem with how I write the path to the file: $xmlDoc = new…
Anders
  • 12,556
  • 24
  • 104
  • 151
0
votes
3 answers

Codeigniter check if values exist with database

I want to compare values with what's in the database. This is my database Id xone xtwo yone ytwo 1 519 819 64 364 The name of the database is num. public function coord_check() { $X…
user951042
0
votes
1 answer

where to add- class="required" (jquery validation) in form_dropdown?

I have a dropdown list which is being populated from database. It is working fine but in the form_dropdown in the view file, I want to add class="required" for validating the dropdown using Jquery. I have tried to make it work but as it turned out…
black_belt
  • 6,601
  • 36
  • 121
  • 185
0
votes
1 answer

pass values from 2 tables to a view codeigniter

im having function that will display both buy and sell listings. Im trying to display both of these in one page. im getting the values from 2 different tables and i wanr to pass both the values into the same template Can someone please suggest how…
LiveEn
  • 3,193
  • 12
  • 59
  • 104
0
votes
0 answers

Can I add ellipsis in between first and last pages in codeigniter pagination?

Can I add ellipsis in between first and last pages in code-igniter pagination? I want to display the pagination like <1,2,3,....9,10> using PHP code-igniter frame work. How can I achieve that? I had used answers to some other stack overflow…
kekarot
  • 1
  • 1
0
votes
2 answers

Cannot get FlexiGrid for CodeIgniter to work

I'm trying to use FlexiGrid plugin with CodeIgniter, but when the page displays the grid shows, but there are no records, and there is a little message saying that you should wait while it's processing, which never goes away... I'm using one of my…
Anders
  • 12,556
  • 24
  • 104
  • 151
0
votes
3 answers

Perform validation only on create using php-activerecord

I am creating a User Model using Codeigniter and php-activerecord and the wiki says I can use 'on' => 'create' to have a validation only run when a new record is created, like this, static $validates_presence_of = array( array('title', 'message'…
TimOz44
  • 11
  • 1
  • 6
0
votes
3 answers

CodeIgniter - modular?

I'm building several sites that need similar "modules." For example, the sites may have the exact same login system, forum, etc. Is there a way I could build these modules once and just "drop" them in these various sites? Some of the challenges I…
0
votes
1 answer

Set_radio codeigniter from database [EDIT REGISTRY]

I have following code: echo form_radio($arr_gen_fem, ($btn_value == 'Editar') ? ( isset($row_new_person) ? $row_new_person->gender: set_value('gender')) : ''); I need display the value from database for edit registry, but this not…
fireflx
  • 1
  • 3
0
votes
0 answers

Update data Use SET ,calculation CI3

i have a problem i am new to ci 3 can you guys help me. I have an update query but I want my query to be like this in dalah ci UPDATE saldo SET saldo = saldo+$nominal WHERE id='$id'; following my controller: public function updatedebet(){ …
0
votes
4 answers

xsendfile only works from index

I'm trying to send a file to the user using xsendfile within the code igniter framework. It is all installed correctly, my problem is that it only seems to work from the route, even though every page comes from index.php anyway. This is my…
John Mellor
  • 2,351
  • 8
  • 45
  • 79
0
votes
0 answers

php arrays, How come the maximum array size is 7...?

An array I use in my PHP code can grow only up to 7 elements. Could anybody shed some light to figure this out? please. Description: I use a PHP session to store an array, which should grow by adding data element on each click I made using Ajax…
Lak Ranasinghe
  • 240
  • 4
  • 13