codeigniter

MVC for footer-header-sidebar at codeigniter.

Hi friends, I use codeigniter. I have footer_view.php, header_view.php and other view php files for pages like aboutus, contactus, etc... for example for about us page, I create model for db actions, than I create a controller to get db variables and send variable to about us view as: $this->load->view('aboutus/',$data); everthing is...

Best way to make Admin pages in MVC?

I'm working on an app in CodeIgniter, and I want to have admin pages for several of the objects in the application, and I'm wondering what would be the better way to put these into an MVC structure. Idea 1: In each controller, have an admin function, and add all of the admin pages I would like into that function. example URL: domain.co...

Code Igniter Login, Session and Redirect Problem in Internet Explorer?

I'm still new to code igniter and I'm having problems getting the login system to work. The login always works when I use Firefox. The login consistently works on some IE7 browsers but consistently fails on other IE7 browsers. When tracing the code, I see that the models/redux_auth_model.php does successfully authenticate the use...

learning php OOP

Hi Guys, I'm learning PHP and I'm not that familiar with OOP yet - I've read a book about it, but never really programmed using OOP. I would also like to learn how to use a framework (codeIgniter, as it seems the most 'friendly' to beginners). Now I need a suggestion from you: would you recommend learning FIRST the 'standalone' OOP a...

CodeIgniter adding semicolons

How do I stop CodeIgniter adding semicolons ; to data sent via POST that contains ampersand &? For example it is converting "a=1&b=2&c=3" into "a=1=2=3". From looking on the forums it seems to be XSS filtering, which I don't want to disable site-wide only for 1 controller, so I tried the code below but it's still doing it: $this->confi...

jQuery update does not work with IE7/8

With the help of members from this post, I converted from prototype to jQuery. function jsUpdateCart(){ var parameter_string = ''; allNodes = document.getElementsByClassName("process"); for(i = 0; i < allNodes.length; i++) { var tempid = allNodes[i].id; var temp = new Array; temp = tempid.split("_"); var real_id = ...

Using codeigniter to send a digest mail, once a week, to members.

Hi all, I'm new to codeigniter, and I'm trying to figure out how to implement a weekly digest, sent to members. I currently have the email set up correctly, and now am trying to get the 'weekly' part down. I know how to use date / time functions to check if one week has elapsed, but how do I run something, say, 'every monday at 8pm'...

How to make session to allow different project?

I am planning to make a project management with PHP/MySQL/Codeigniter. It will have 10 - 20 users and 20 - 30 projects going on at the same time. Let's say John is a member of project A, B and C. Cindy is in A, D, F G etc. I want to make it only members of project can access the project. Now I am not sure how to approach this. Wha...

Codeigniter: Variables/Config Items within Language Files

I have a language file with a long list of strings for my view files. My question is how to pass a variable or a config item to a language file? <?php $lang['error_activation_key_expired'] = 'The activation key you have attempted using has expired. Please request a new Activation Key <a href="'.$this->config->item('base_url').'member/re...

Using zend studio with codeigniter

I want to use Zend Studio for a project built on CodeIgniter. But I want to be able to use the debugging functionality of Zend. Because of that, I cant seem to get the debugger to work properly cause it doesnt "understand" codeigniter. So, in order for the setup to work, do I need to install Zend server, so that the debugging is done ser...

2 Codeigniter Controller Querys on One View

How do you put two different function outputs from the same controller into the same view(page)? For example, I have a function going to the "article" div, and another function that I am trying to use within the "aside" div. (using HTML 5 nomenclature here) I have went as far as using the actual db query in the (view)aside div and it st...

CodeIgniter validations

I have a set of fields to validate. Here is the scenario. Let's say I have fields shown below. Since the names are the same I put a number and add at the end. job_title_1 company_name_1 responsibilities_1 job_title_2 company_name_2 responsibilities_2 job_title_3 company_name_3 responsibilities_3 In my view, I...

codeiginter - business logic - controllers, models or library?

in CI, for me at least, views must be your layout (html), controllers are the structure and models handles the data. When building an app, where do business logic will be? I have maintained the controller only to handle urls, because i want to separate structure to business logic. i've been using my models to retrieve data and process i...

Using CodeIgniter is it bad practice to load a view in a loop.

I just got started with CodeIgniter and am wondering will it slow things down if I put code like this in a loop. $data['title'] = 'the title'; $data['content'] = 'blah blah blah'; $this->load->view('result', $data); I'm not entirely sure how CodeIgniter handles things, or PHP itself for that matter. For example if I did th...

codeigniter form validation for a set of fields

hi to all I hav a set of fields to validate. here is the scenario let say I have fields shown below, since name are the same I put a number and add at the end. job_title_1 company_name_1 responsibilities_1 job_title_2 company_name_2 responsibilities_2 job_title_3 company_name_3 responsibilities_3 In my view, I use loop to assign th...

Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/libraries folder, renamed to simplepie.php I enabled curl on Apache. I attempt to load SimplePie as follows: this->load->library('simplep...

Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to CodeIgniter... Please Help! Thanks... ...

Loop through form input arrays in php

Hi I'm building an app in CodeIgniter. I have an invoice form which uses jQuery to create new line items. The line items are formated as follows: <input type="text" name="invoice[new_item_attributes][][description]" class="ui-corner-all text invDesc" title="Description" /> <input type="text" name="invoice[new_item_attributes][][qty]" c...

Form Inputs updated via JS don't get submitted

Hi, The invoice input values which hold the totals of invoice line items that get updated via JS return a NULL value when they are submitted. <span class="sublabel">Subtotal</span><input type="text" class="total-box" id="product-subtotal" readonly="true" /> <span class="sublabel">Tax</span><input type="text" class="total-box" id="produ...

What's the proper MVC way to do this....?

Quick question about general MVC design principle in PHP, using CodeIgniter or Kohana (I'm actually using Kohana). I'm new to MVC and don't want to get this wrong... so I'm wondering if i have tables: categories, pages, notes I create a separate controller and view for each one...? So people can go to /category/# /page/# /note/# ...