Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 662605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:23:49+00:00 2026-05-13T23:23:49+00:00

I am using Codeigniter to develop an application, and have been reading bits about

  • 0

I am using Codeigniter to develop an application, and have been reading bits about Ruby on the Rails. In particular Skinny Controller, Fat Model seemed to make perfect sense. It really allows me to look at the controller and know what the hell is actually going on, and allows very very quick adjustments and bug fixes.

However the one stumbling block I have is, where do I handle POST data. Do I call it into a bunch of variables in the Controller and pass that to the model. Or do I just access it direct from the model?

Additionally I am having the same problem when thinking about prepopulating form field values. Should I call a single method from the controller and pass the result to the view or just make a bunch of variables and pass them to the view directly from the controller.

Any guidance greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:23:50+00:00Added an answer on May 13, 2026 at 11:23 pm

    There are a couple ways to handle this, but generally, it is not considered consistent for the view to call $this->CI->input->post( $item ). Generally, your view is best if restricted to purely displaying data and the only function calls it should make are calls like anchor, lang, et al. It is also better to avoid having your models grab data from outside, especially when they can be passed in the information (possible exceptions are language and config data). The traditional separation of concerns in CodeIgniter is that the Model stores data, the View displays data, and the Controller manipulates it (sometimes this will be libraries manipulate the data and the Controller calls library functions).

    Pre-populating is clearer if the information is passed in to the view and then output from the view as <?php echo $value; ?>, but there are some exceptions.

    Basically, these are the rules I follow:

    • The model receives no input save from the Controller.
      • It calls only helper functions and library methods if manipulation is needed.
      • It only manipulates data if the data needs to be stored in a particular way (ie: serialization, etc.).
    • The view receives no input save from the Controller.
      • It calls only helper functions for string lookups and no library methods.
      • The only time it needs to manipulates data is when it is looking up config or language data. This should be understood as translation.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 541k
  • Answers 541k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If I see it right you are using an ObservableCollection.… May 17, 2026 at 2:48 am
  • Editorial Team
    Editorial Team added an answer You might find this helpful if I understood you correctly.… May 17, 2026 at 2:48 am
  • Editorial Team
    Editorial Team added an answer It's easier than you'd think. If UI is your only… May 17, 2026 at 2:48 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am using codeigniter php MVC framework to develop a web application. I have
I'm using CodeIgniter to develop a new web app, and I'd like to create
CodeIgniter is brilliant but I'm using it to develop a site where users need
Using CodeIgniter's Active Record class and MySQL, I have a table of posts with
Using Codeigniter, I'm able to create a function for user authentication. I have a
A few questions today :) I am using Codeigniter. I have a header view,
I am writing a web application using Codeigniter for a client and am using
I'm using DX_AUTH to handle autentication in my codeigniter app. I want to display
Using CodeIgniter, how do I access and display text entered into an input field
Using CodeIgniter, I am trying to place several images onto my view page as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.