How to redirect using $this-session-userdata(country_territory) |
(09-24-2019, 08:17 AM)Wouter60 Wrote: Why not simply one controller that takes the country as a parameter? If you have a controller for each country, you'll probably have to write a lot of code over and over again. That's bad practice. How do I allow the User to create an advert, then connect the advert with the country? I have the country controller separated by function classifieds which provides for the User to upload an advert, but I don't know how to connect the advert and or the User to those classifieds. Im thinking if I create a controller say named "Adverts" and have a series of functions named 1, 2, 3, 4, 5, and so on, to match the user_id, and create an advert template within each function. Would that be appropriate? Is there some way to auto generate the function names either by user_id or user_name? |
Welcome Guest, Not a member yet? Register Sign In |