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

cannot get record which exist between a given time in codeigniter

I want to get records which exists between given start time and end time, start time and end time will be given by user, i'm using the following query for that : $this->db->where('TIME(start) BETWEEN "' . date('H:i:s', strtotime($start_time)) . '"…
user3653474
  • 3,393
  • 6
  • 49
  • 135
0
votes
1 answer

How to extract all data from sql table and save it in excel file in codeigniter using SimpleXLSX

I want to get all the data from mysql table and save it in Excel format using SimpleXLSX library and let the user download that excel format. I have use that library before for importing data from excel file but now i want it for exporting from…
user3653474
  • 3,393
  • 6
  • 49
  • 135
0
votes
0 answers

To assign the data on a variable specifically based on a category

I am developing a expense manager app, So the scenario is I want to show Summary screen for expense and Income. I have write code for this but problem is I want to store the category data like medicine, travel, communication in a particular variable…
Saif Ali
  • 1
  • 2
0
votes
1 answer

in code igniter i want to show only those subject's topic list to user which are alotted to the current user

i want to give access to only those subject's topics which are alotted to a user i'm taking subject id(sid) when admin upload topics . and by a view file i am trying to match that sid of topic to a from that m-topic table so i stored value og one…
0
votes
0 answers

How to insert key and value of an array into another array key?

//at Controllers $array = null; //insert element value to array for ($x = 0; $x <= 10; $x++) { $array[]= array('package_size'=>$x); for ($y = 10; $y >= 0; $y--) { $array[]= array('downline_list'=>$y); …
zac1987
  • 2,721
  • 9
  • 45
  • 61
0
votes
1 answer

passing optional variable to pagination in codeigniter

What I would really like to do is create an optional text to pass to a controller method in codeigniter. Currently I have something like this public function manage($page = 1, $method = '', $id=0) { //code } So if the parameters are not passed…
jisaacstone
  • 4,234
  • 2
  • 25
  • 39
0
votes
0 answers

How I can active $record

I have table like this public function getDoctorPhotoRecord($count) { $this->db ->select('u.id, fullname, image, unvan_code, baslik, onayli') ->from('user as u') ->join('user_detail as ud', 'u.id =…
0
votes
1 answer

which function should i use in place of redirect() in codeignitor?

I want user not to jump on my welcome page through URL so. I added session user data in the constructor but redirect is not working showing "ERR_TOO_MANY_REDIRECTS".. so I use header() and site_url and base_url too but not of these are working... …
ruchi
  • 17
  • 5
0
votes
1 answer

Codeigniter - Custom 404 Pages (unable to Extend CI_Exceptions)

Trying to extend codeigniters CI_Exceptions class so i can override the show_404 method but I just get fatal with the following message: " Fatal error: Class 'CI_Exceptions' not found " The contents of MY_Exceptions is as follows: class…
David
  • 3
  • 1
  • 2
0
votes
1 answer

Calculate End time from Start time field in codeigniter from database

I have a table structure something like : id | name | start_time | duration 1 xyz 05:00 PM 4 Code $from_time=9:30 AM; $sessionData=$this->db->where('start_time>=',$from_time)->get('user_session')->result(); In the above code i want…
user3653474
  • 3,393
  • 6
  • 49
  • 135
0
votes
1 answer

MAMP and CodeIgniter - Simple form post returns Fatal error: Uncaught Error: Class 'CI_Controller' not found

Bashing my head on the wall to resolve this error. I'm using codeigniter 2 with MAMP on localhost. This site works perfectly on WAMP (Windows 10) and all configuration is the same. I have a simple login form which, on submission does not even hit…
0
votes
1 answer

How to put validation on a variable value in codeigniter

I am trying to put validation on a variable value using set_rules function from codeigniter. is it possible to do that? My code is below : $client_name = "Some name"; $this->form_validation->set_rules($client_name,'Client','required'); Even i have…
0
votes
1 answer

PHP Codeigniter Session error: Message: session_cache_limiter(): Cannot change cache limiter when session is active

php -v:7.3.11 codeigniter -v:3.0.3 A PHP Error was encountered Severity: Warning Message: session_cache_limiter(): Cannot change cache limiter when session is active Filename: core/MY_Controller.php Line Number: 24 Backtrace: File:…
Nithin M D
  • 115
  • 1
  • 14
0
votes
1 answer

CodeIgniter dbutil - trouble creating DB

Trying to make a setup for my application. However, I am having trouble getting it to create the database for me. If I create the database manually, everything is fine. If the database is not there, I can't do anything, and I get the following…
0
votes
2 answers

How to echo user in text field who created another user data? in php codeigniter, im a newbie hope anybody can help thanks

I have my crud which is I want to upgrade it which is I want to echo the user who created another user account. This is my controller to add the user. public function add() { $this->data['page_title'] = "Add User"; $input_data =…
cdt
  • 135
  • 1
  • 1
  • 9