Using a variable

Hi there,

I’m looking to do the following:


However, when the redirect takes place, it just writes userid=$userid rather than pulling in the actual user id from my app.

Any help?


Try this:

$this->redirect('' .$userid. '');

or this:



If you are using single quotes then the variable will be read as a $value so you would need to come out of the quotes to put the value.

$this->redirect(''. $userid);

or use double quotes


which will parse the value

Thank you, Spike for catching that.

Awesome, thank you!! worked a charm :slight_smile: