Vadiklk
Vadiklk

Reputation: 3764

Adding a parameter with http in the url doesn't let me to get the parameters

I am using an external web service and it uses an Iframe to show my page. When it shows my page it appends to it it's parameters:

?assignmentId=asda&hitId=asda&workerId=asda&turkSubmitTo=https%3A%2F%2Fwww.mturk.com

I want to get the assignmentId parameter, but it doesn't work. What I know is that removing the https in the params will make it work. What should I do and why does that happen?

I am using PHP5 with Zend Framework.

Upvotes: 1

Views: 99

Answers (2)

JellyBelly
JellyBelly

Reputation: 2431

use this:

$assignmentId = $this->_getParam('assignmentId');

in this way is if the parameter arrives by post or via get the withdraw more! ;)

Upvotes: 1

Layke
Layke

Reputation: 53196

You should be able to access it just as you would normally access the parameter.

The only reason you shouldn't be able to is if you have setParamSource to only use 'POST'.

So try again using $this->getRequest()->getParam('assignmentId');

Also, if all that fails, just directly access $_GET['assignmentId'].

Upvotes: 1

Related Questions