Welcome Guest, Not a member yet? Register   Sign In
Get back where you where with same var.
#2

[eluser]coolfactor[/eluser]
It sounds like you're bringing the definition of a "controller" from another framework? You don't need one controller per table. Controllers define sections of your site (related groups of pages), so you might have a single Shop controller with methods for viewing a garage, listing cars in a particular garage, listing parts for a car, and so on.

I use functions like:

- garage_view() - show details of garage
- garage_edit() - edit details of garage
- garage_save() - save changes for garage

- car_view() - show details for car (list all parts, etc.)
- car_edit() - edit details of car
- car_save() - save changes to car

Normally, the save() functions redirect back to the view() function when they are done (using a browser redirect). If you need them to do something depending on which button was clicked, then provide different Submit buttons, and have the save() function detect which submit button was clicked, and then take appropriate action.

Does that get your started?


Messages In This Thread
Get back where you where with same var. - by El Forum - 08-07-2007, 10:05 AM
Get back where you where with same var. - by El Forum - 08-07-2007, 10:32 AM
Get back where you where with same var. - by El Forum - 08-07-2007, 11:23 AM
Get back where you where with same var. - by El Forum - 08-07-2007, 11:29 AM
Get back where you where with same var. - by El Forum - 08-07-2007, 11:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB