1

I was successful in using fragment with drupal_goto, but when I use it AND query, I am not able to get the request parameters using $_GET from the query.

I can see the request parameters in the URL, but it returns NULL. The URL is constructed as http://mydrupalsite/?code=success#overlay=admin/vendor/auth-stripe.

I am attempting to use $_GET['code'] to get the parameter. I also tried $_REQUEST

2
  • If that's literally what you're doing (using $_GET['code'] on a page with exactly that URL), and it's not working, your version of PHP is broken, or you have something stripping out the $_GET var before it's available to you. Using Symfony/Laravel/etc? They all do that – Clive Aug 11 '15 at 15:51
  • I think you have some other issue. I tried $_REQUEST['code'] on my site and it's getting correct value. – WaQaR Ali Aug 12 '15 at 13:32
2

I'm guessing you're trying to access the $_GET from the page that's loaded in the overlay (admin/vendor/auth-stripe). If that's the case, then you've constructed the url wrong. It should be: http://mydrupalsite/#overlay=admin/vendor/auth-stripe%3fcode%3dsuccess

That said: where are you actually constructing this URL? If you're doing it properly, all of that should be taken care of for you automatically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.