Welcome Guest, Not a member yet? Register   Sign In

How would I go about adding functions to a controller that receives in input?

For example, my index function show the basic "project" page:

"federal-building" is my project_name that gets sent.

function index($project_name)

But when somebody clicks on an image, I want to launch:

function photo($photoid, $project_name)

this url would be http://localhost:8888/website/project/fe...g/photo/1/

The $photoid would be 1 in this url.

For some reason the function doesn't get hit when I use this url, how would I do something like this?

You misunderstood the url scheme.

Your url should be something like:


You might also need to rethink your function, I can't think of a situation in which you would need to path both the id and the name in an url.

Theme © iAndrew 2016 - Forum software by © MyBB