I understand the code you use to generate the page would be put in the view section of the MVC pattern of CI.
I am trying to understand the logic flow of the function when 1. user provide input 2. input sent to database 3. add another DOM element to show the input.
For example, just like Facebook, when you leave a message on someone's status, your message will be 'added' to that chain of reply to the status.
So in the view.php, I would write such that when you try to reply, an Ajax call would be made to the controller.php, and routed to model.php (which would 'add' the new msg to the status in the DB), after this, where do I go from here?