Welcome Guest, Not a member yet? Register   Sign In
How to redirect using $this-session-userdata(country_territory)
#10

(09-26-2019, 12:30 PM)Wouter60 Wrote: Don't create functions for every user.
Create one function that accepts the user_id as parameter.

Controller: Adverts.php

PHP Code:
public function create_advert($user)
{
  


To use this function: https://example.com/adverts/create_advert/3
(where 3 is the user_id).

OK, I've created an Adverts Controller and several functions within, but I can see that I have a lot of learning to do.

Throughout the development I've used routes together with <a href="/createadvert">CreateAdvert</a> links rather than url inserts. Can you explain how I would automatically get the user_id within a link?

And before a Users creates an advert I want to give them an option of the advert layout, for example the "Description - Images - Ingredients - Details" to be in different places on the page. Where & how can I achieve that?
Reply


Messages In This Thread
RE: How to redirect using $this-session-userdata(country_territory) - by christaliise - 09-28-2019, 01:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB