Questions tagged [codeigniter]

CodeIgniter is an open-source PHP web development framework created by EllisLab Inc. The framework implements the Model-View-Controller design pattern. It is praised for its performance and the quality of its documentation.

Filter by
Sorted by
Tagged with
3 votes
2 answers
285 views

PHP blogging application with AJAX loading

I have been working on an online newspaper/blogging application with CodeIgniter 3.1.8 and Twitter Bootstrap 4. The latest feature added is lazy loading of posts. From the Static_model (...
user avatar
1 vote
2 answers
158 views

Newsletter subscribers management system in CodeIgniter 3

I am working on a online newspaper/blogging application with CodeIgniter 3.1.8 and Twig. The application is meant to offer developers and designers the possibility to very easily turn their HTML ...
user avatar
1 vote
1 answer
396 views

Newsletter Subscription Functionality in Codeigniter 3

I am working on a online newspaper/blogging application with CodeIgniter 3.1.8 and Twig. The application is meant to offer developers and designers the possibility to very easily turn their HTML ...
user avatar
2 votes
1 answer
611 views

Password reset functionality in Codeigniter 3

I am working on an online newspaper/blogging application with CodeIgniter 3.1.8 and Twig. (I use the Twig template engine only for the front-end views). The application, of course, has a registration ...
user avatar
3 votes
2 answers
217 views

A contact form with CodeIgniter and Twig

I am working on an online newspaper/blogging application with CodeIgniter 3.1.8 and Twig. I use the Twig template engine for the front-end views. I have put together this simple contact form which ...
user avatar
1 vote
2 answers
244 views

Implementing Pagination with Twig in Codeigniter 3

I am working on a online newspaper/blogging application with CodeIgniter 3.1.8 and Bootstrap 4. I have decided to add themes to it. The application is not HMVC, only MVC. I thought it was a good idea ...
user avatar
2 votes
1 answer
221 views

Using dynamic methods to build SQL queries in CodeIgniter

I'm using this class as Modal in my CodeIgniter project, as I'm newbie in CI, I wanna know if this has some issues, I'm using this modal for all queries, like I call this with parameters and it ...
user avatar
1 vote
1 answer
339 views

Codeigniter 3 CMS (blogging) application

I am working on a basic blog application with Codeigniter 3.1.8 and Bootstrap 4. The application has users (authors) and posts (articles). Every article: has an author, belongs to a category, has a ...
user avatar
3 votes
2 answers
121 views

PHP Edit Volunteer Group Form

I have a PHP CodeIgniter website that collects volunteer registrations. One thing I have noticed is that the controllers are getting really big. The controllers have many methods, and each method is ...
user avatar
4 votes
2 answers
332 views

Blogging application with Codeigniter back-end and AngularJS front-end

I am working on a blog application with Codeigniter 3.1.8 and AngularJS v1.7.8. The Dashboard of the application is "pure" Codeigniter, with Models, Controllers, and views, while the fronted is made ...
user avatar
2 votes
2 answers
2k views

Codeigniter 3 Registration and Login System

I am working on a basic blog application in Codeigniter 3.1.8 and Bootstrap 4. The application allows Registration and Login. I have concerns about the security level of the Registration system I ...
user avatar
0 votes
0 answers
71 views

Is there any better approach on this rows to columns table?

I pass a function into the variable ($monthly_receivable) to get the value of each months to pass and get the result of a function.. but the process is dumb slow. ...
user avatar
4 votes
1 answer
77 views

Codeigniter models optimization

I have two tables: tableA aid name age sex ...
user avatar
  • 41
4 votes
1 answer
333 views

Codeigniter 3 micro-blogging application

I am working on a basic blog application in Codeigniter 3.1.8 and Bootstrap 4. The application allows Registration (as an author), Login, adding Categories and Posts. I have created an installation ...
user avatar
3 votes
0 answers
299 views

Codeigniter 3 loading models in a different way

I'm currently building an application that uses the same models in different controllers. Instead of using the normal way, being loading the model in the controller I've build a "core controller" (<...
user avatar
  • 31
1 vote
0 answers
36 views

performing SQL SELECT query inside the loop [closed]

I have a table leave_muster inside which I have to update all the records of the previous month on every start of the new month. My Code ...
user avatar
1 vote
3 answers
842 views

Codeigniter 3: how can I avoid repeating this chunk of code in my controllers? [closed]

I am working on a basic blog application in Codeigniter 3.1.8 and Bootstrap 4. Several entities are present in all controllers (except Login.php and Register.php): static data, categories and pages. ...
user avatar
0 votes
1 answer
510 views

Get chat message data from table, grouped by date

Giving the following table: ...
user avatar
3 votes
1 answer
73 views

Ajax table action and process

I'm trying to learn Ajax better, and I'm developing an application in CodeIgniter. The following code is working, there are no errors. But for every function and call I think I'm repeating callbacks ...
user avatar
2 votes
1 answer
1k views

CodeIgniter method to get requests for superiors to approve

I'm currently working on an approval system right now using PHP (Codeigniter) and I have this method of getting all the requests according to your department group and position depth. The checking of ...
user avatar
  • 39
2 votes
0 answers
634 views

CodeIgniter CRUD form validation

I've developed a crud "helper" of sorts. Fields/columns are derived from the database and contain everything from the name of the field to the type and size of the field. Part of the system integrates ...
user avatar
  • 193
2 votes
1 answer
157 views

Codeigniter Controller for work orders

I'm working on a project and one of my controllers is getting quite large and hard to maintain or add to. I'm having trouble deciding what belongs in the controller and what I can move to the model. ...
user avatar
0 votes
2 answers
3k views

Codeigniter 3 - Set Flashdata Array issue

I need help about CodeIgniter $this->session->set_flashdata array. I think my code is so long, is there any way to simplify my code? Script at my views <...
user avatar
  • 103
0 votes
2 answers
4k views

CodeIgniter CRUD using AJAX

I am trying to use AJAX with CodeIgniter. I have some code, but I am not sure that the code is in proper way / officially correct according to the programming way. All I want is that if someone in the ...
user avatar
  • 109
2 votes
3 answers
152 views

Report Page on Volunteer Signup Website

I am creating a website that collects volunteer registrations for events (also called races in the code). I am using PHP CodeIgniter (which follows the MVC model). I created a control panel that has ...
user avatar
1 vote
2 answers
2k views

Sync Server Time with User's Timezone

I have a web application which is being used by users from different parts of the world. In order for users of the site, to be able to view the timestamps in their local time, I've a settings page set ...
user avatar
  • 175
1 vote
1 answer
110 views

Building a task listing for a task manager

I'm super new to CodeIgniter 3 and I'm using it to build a task manager (Claritask.com). Also, I'm just starting to learn how to program, so forgive me beforehand if I'm not making sense and I'll try ...
user avatar
2 votes
2 answers
452 views

Login implementation security concerns

In many of my personal projects, I have a login system very similar to the one I am about to describe. I understand how difficult correctly implementing authorization systems can be. I do this as a ...
user avatar
  • 173
1 vote
1 answer
248 views

Round fractional seconds of MySQL Time

I've written a method to round a MySQL Time to two decimal places. Here's some examples: ...
user avatar
1 vote
2 answers
252 views

Reduce repetition when sharing data across an application

I have a CodeIgniter 3 application. There is some data every page across the application needs to have. This is the system I currently have. Create a model function that will get the data I need <...
user avatar
  • 173
1 vote
0 answers
67 views

Implementing internationalization functionality for online English lessons

My website purpose is to sell online English lessons to people in Europe. It is crucial that my site is multilingual. Overview I am using HMVC modules to organize my site and my website has four ...
user avatar
1 vote
1 answer
362 views

A localization helper in codeigniter

I created a project to better understand CI3, while developing it I tried to introduce localization elements. When I tried to localize the view everything messed up. I made a helper to identify if the ...
user avatar
1 vote
1 answer
270 views

Volunteer Signup Page

In a previous code review, it was strongly suggested that I start using PHP Frameworks to improve security for my websites. I tried Laravel and got stuck due to the steep learning curve. Then I tried ...
user avatar
1 vote
1 answer
96 views

CSRF-prevention mechanism for a form

I am using codeigniter framework in PHP. In signup form I have: Controller: ...
user avatar
3 votes
3 answers
1k views

MVC design to fetch, store, and present data from an external source

A couple of weeks ago a company sent me this coding challenge: Please write a PHP web application and send it back to me as zip file: Which waits for a user action, like clicking buttons. According ...
user avatar
  • 139
1 vote
1 answer
70 views

Validation of uploading images and adding records to the database

I am doing a php project with the codeigniter framework. In my controller, I have a function that does the following. Uploads an image to the server Add a row to the database. The data would be ...
user avatar
3 votes
2 answers
1k views

Web dashboard using many REST API requests

I have created REST API in codeigniter. REST sever created in codeigniter 3.0 and REST client created codeigniter 2.x.x. I have wrote simple code for login. After login client created dashboard page....
user avatar
  • 131
3 votes
2 answers
379 views

PHP+JS Code Combining

Just wondering if this is okay to do? I have to store some PHP variable values into LocalStorage. ...
user avatar
6 votes
2 answers
41k views

Login system with session using CodeIgniter

I implemented a login system, with session, using CodeIgniter. If the session doesn't exist, redirect to login page. Please review, and let me know what can be done to make it better. view (login.php)...
user avatar
  • 161
1 vote
1 answer
2k views

Codeigniter calling conditional data retrieval model method from controller

I am wondering if there's a better way to structure my code. I want to keep my controllers thin but at the same time want to keep the model methods flexible. As you can see below, it's almost as if I ...
user avatar
  • 141
8 votes
4 answers
958 views

Checking 160,000 records in a database for changes

I am checking over 160,000 records in my database every 24 hours to see if there were changes in the incoming data coming from API and my existing data in the database. If there were I am updating ...
user avatar
3 votes
2 answers
90 views

Notification cron

I've built an appointment manager and would like to notify clients 2 hours ahead of time by via email of their scheduled appointment time. I am storing their scheduled time in a MySQL Datetime field. ...
user avatar
  • 133
1 vote
1 answer
8k views

User model with user roles in Codeigniter PHP/MySQL

I am building an app that currently allows the users to have 3 different roles: Consumer Merchant Admin I have three tables: user (Name, email, password etc with a status=0/1) user_role (The list ...
user avatar
  • 141
1 vote
0 answers
895 views

Add user and image upload script

This is my Codeigniter Controller and Model for user image and data upload. I have some questions here: Is this good way of writing this script? Can this code be put to production if its need is ...
user avatar
1 vote
0 answers
4k views

Codeigniter form flow for model and controller

I'm working with Codeigniter most of the time (about one and a half year now) and I came across many form validation code flows. Here are my best two selected shots which I created for a client ...
user avatar
  • 301
1 vote
0 answers
510 views

Login authentication model

I have made my model global so that I can work only a model with several controllers. Is it good or bad practice? And according to this, is my login process secure? Login check function in Controller:...
user avatar
1 vote
0 answers
2k views

Handling user permissions in Code Igniter

I haven't done much work with Code Igniter, and can't seem to get much of a definitive answer poking around as to what the best solution to this problem is. Before moving forward, I wanted to see if ...
user avatar
2 votes
2 answers
185 views

Identifying a development and production server by http_host

I am using below code to recognize which set up I need to use in Codeigniter: ...
user avatar
3 votes
0 answers
188 views

Building the HTML body view

I created a library class in CodeIgniter that handles building the HTML body view. This class builds the body, adds content and adds javascript element tags at the end. The body is built by using a ...
user avatar
1 vote
0 answers
3k views

Permission control on Codeigniter

The User Model ...
user avatar