3
votes
1answer
522 views

Codeigniter active record - prepared statement assistance

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 ...
0
votes
1answer
46 views

CodeIgniter Model - Correct/Secure Usage?

I'm working on my first large CodeIgniter project (and one of my first MVC projects), and I want to get some feedback on the techniques I've used so far in one of my models. Here's the code: <?php ...
1
vote
1answer
61 views

A good example of codeigniter MVC?

What is the difference between this two way and Which one is best? What do you suggest? 1. Use of query (db) directly in CI_Controller. as: $id = $this->input->post('id'); $query = ...
0
votes
2answers
183 views

Submit function For Login

Trying to see if anyone sees any potential flaws with this submit function. One concern is this line: /* Not sure if this is needed if ($this->session->userdata('failed_logins')) { // User ...
2
votes
1answer
185 views

How to make this PHP code more object oriented and less scripted

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

is magento architecture useful for more smaller applications?

Hi I realy like how magento creates it's view. It's not standart MVC like Codeigneter or Ruby on Rails. Magento has Block and Template. So I have created an architecture like this. I have layouts ...
1
vote
1answer
71 views

Getting personal messages function

I'm trying to develop a better function and curious what others would suggest I do to it so that its not so robust and still accomplish what I need. A couple of things I need to account for is when I ...
2
votes
1answer
289 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
126 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
1answer
53 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 ...
12
votes
3answers
5k 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 ...
1
vote
2answers
278 views

Controller for an Administrator User, can this be improved? (codeigniter)

I want to write better code. This is a simple controller class for an administrator login. Are there conventions or tips in PHP to rewrite this code and improve it? <?php class Administrators ...
2
votes
3answers
364 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. ...
0
votes
1answer
207 views

Login Controller

Here's one more controller I'm trying to get reviewed for. Any thoughts? <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Login extends CI_Controller { public ...
0
votes
2answers
129 views

Evaluating My Code

I'm just trying to see if there's a better way to write the code i between the aestrick characters. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Activate ...

1 2 3
15 30 50 per page