We’re rewarding the question askers & reputations are being recalculated! Read more.

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
28
votes
3answers
35k views

CodeIgniter Active Record Subqueries

I use CodeIgniter at work, and one of our model files had a lot of subqueries in it. I originally had to manually write each subquery, and wondered if I could use active records instead. So, to make ...
8
votes
4answers
948 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 ...
6
votes
2answers
1k views

Critique My Codeigniter Custom CMS Pages Model

I am currently developing a custom CMS being built on top of Codeigniter and was wondering if you can spot any flaws in my page fetching model code. The page fetching model is not entirely complete ...
6
votes
2answers
963 views

CodeIgniter Model I built

Can I get some pointers, critiques and/or comments on the following model? (p.s. performance seems great... tested all methods up to 10,000 records) ...
5
votes
2answers
38k 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)...
5
votes
1answer
3k views

Codeigniter Login Controller

Instead of creating an Admin_Controller or MY_Controller I was going to try and just try out all my controllers on requirements that are needed per controller. I know this may seem like additional ...
5
votes
1answer
256 views

jQuery click handlers

I'm working with Codeigniter and I have a jQuery file to add some functionalities. But I think I'm doing it in a wrong way. ...
5
votes
1answer
1k views

PHP login script security check

I made an admin login script for my own CMS website that I'm making in Code Igniter 2.2.1 and I'd like to know what are the potential threats or some holes that I might have left open. This is how it ...
4
votes
2answers
4k views

Codeigniter Model Optimization

I have created this model for Codeigniter. It's working fine, but I need to know if it can be more optimized. ...
4
votes
2answers
1k views

SHA256 password hash generation and verification

I would like to optimise this code. It seems a bit verbose, particularly with the 'elseif' that doesn't do anything. This code either: takes a plain text password, generates a salt, and returns them ...
4
votes
2answers
898 views

Am I using MVC Codeigniter correctly?

I'm currently writing Report's system. I have about 20 different users with different access. Am I doing it correctly? Can I improve my style of writing this code? All my reports based on the same ...
4
votes
1answer
43 views

Codeigniter models optimization

I have two tables: tableA aid name age sex ...
4
votes
1answer
252 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 ...
3
votes
3answers
2k views

Login Validation

I'm hoping someone is willing and can take a minute to look over this function and tell me what they think of it, if it can be improved or what not. I tried commenting out what the purpose of ...
3
votes
2answers
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....
3
votes
3answers
1k views

CodeIgniter AJAX messages submission security issue

I have a small social networking site built in CodeIgniter. Any registered user can send messages to others by visiting their profile. Today I noticed that one user sent bulk messages to 200 users. ...
3
votes
2answers
78 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. ...
3
votes
1answer
7k views

Where should I put menu items in MVC with PHP - Model or Controller?

This is my first attempt with MVC and I almost get it, but a small thing bothers me. I have this controller in CodeIgniter: ...
3
votes
3answers
461 views

Web register form

This is a page that allow user to do register: ...
3
votes
2answers
4k views

Mutlilevel page list in CodeIgniter

I'm newly working with CodeIgniter and PHP. I wrote a category structured 'pages' code with listing pages as multilevel list or indented select box. ...
3
votes
2answers
371 views

Database design for an online learning application

It is an online learning application with different types of learnable items, that different users learn. The users learn by spaced repetition (once right, wait a couple days, ask again), success is ...
3
votes
1answer
54 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 ...
3
votes
1answer
177 views

Best practice for generating jQuery dynamical content

I am new user of CodeIgniter and I am trying to build an application that there are lots of jQuery dynamical content. Below I provide a code that I am using in order to be precise. The code below is ...
3
votes
2answers
5k views

Loading content in page via jQuery

I'm doing a website in CodeIgniter and I'm loading the content page via jQuery, but I don't know if this is a good practice or not. Could I improve it? jQuery: ...
3
votes
2answers
303 views

Helping to Make My Controller Function DRY

I have the following controller function. What I want to do is make this function do less. Most of this code is just random checks on various things that is also done on most of my other controllers. ...
3
votes
1answer
867 views

Implementing pagination with three modules

I am utilizing CodeIgniter's Pagination class to implement pagination in the project. In this project, there are 3 modules: Event, Business and Parts. Each Module has the same "view" for pagination. ...
3
votes
1answer
135 views

Personal Messsage Model

I'm just wondering how my model looks. And by this I mean did I perform the correct tests with the results on each function and use the return at the right points. If you can check all functions. I'm ...
3
votes
1answer
3k views

Is this good login process in CodeIgniter?

I'm creating my first login process in CodeIgniter. I'm using the simpleloginsecure library for actual session management but I wrote the controller and model myself and I was hoping if you could see ...
3
votes
2answers
11k views

Forgotten password logic

I'm just trying to see if anyone disagrees with the way I'm handling my logic for this. Something doesn't feel right with it but I don't quite know what it is. Just wanted to add that the ...
3
votes
1answer
469 views

Correct MVC in CodeIgniter

In my CodeIgniter project I have a Login controller that load this view: ...
3
votes
1answer
3k views

Codeigniter active record

I understand that I should use prepared statements to prevent SQL injection. Unfortunately, having read the PHP docs on the matter I am none the wiser. Here is one of my simple active record SQL ...
3
votes
0answers
180 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 ...
2
votes
3answers
145 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 ...
2
votes
2answers
228 views

PHP+JS Code Combining

Just wondering if this is okay to do? I have to store some PHP variable values into LocalStorage. ...
2
votes
2answers
203 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 ...
2
votes
1answer
3k views

Builder pattern for Codeigniter ActiveRecord queries

I am using Codeigniter and it's ActiveRecord. I had this idea for a base class that provided a generic getter/setter for doing simple queries on a database. I have a lot of database objects that ...
2
votes
1answer
3k views

Login Controller

Here's one more controller I'm trying to get reviewed for. Any thoughts? ...
2
votes
2answers
1k views

Sorting a list by country name

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. ...
2
votes
2answers
412 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 ...
2
votes
1answer
102 views

Light, custom CMS for a site

I'm working on a light, custom CMS for my site and I am trying to use Ajax calls for most of the server-side interaction. I am still pretty new to web development, so if I am breaking any conventions ...
2
votes
1answer
4k views

CodeIgniter maintain data through Controllers

I have a main menu in my application. It loads depending on the role of the user that I validate from a table in my data base, but I have to recreate this menu every time I call a new controller. ...
2
votes
1answer
8k views

Codeigniter view within a view

I'm calling a view into a view. Am I doing correctly, or is this a bad practice? ...
2
votes
1answer
3k views

CodeIgniter nav/menu insecurities

I more or less asked the same questions on stackoverflow.com, but maybe this is more for this forum. I have a hard time getting to grips with how to implement a top navigation (common for the whole ...
2
votes
1answer
231 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 ...
2
votes
1answer
138 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. ...
2
votes
2answers
156 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: ...
2
votes
1answer
68 views

Is having preset queries prone for disaster?

Edit Just did some further reading around the website and have come to the conclusion that this method leads to Leaky Abstraction, sorry for wasting peoples time. Time to head back to the drawing ...
2
votes
1answer
162 views

Controller method optimization

I have the following function for validating users facebook information against the rules setup in the database for users. Its working fine but i need to know if it can be more optimized. Few things ...
2
votes
3answers
245 views

Relationship between notes and tags

I have 3 objects and 3 models. The note, have many tags, and every tags must have one note. So, I have a note_tag_list to store the tags and notes relationship. ...
2
votes
0answers
24 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" (<...