[development] When calling drupal_goto I can't seem to successfully pass a querystring along with the url.
John Mitchell
mitchelljj98 at gmail.com
Thu Mar 10 18:23:38 UTC 2011
thanks for the suggestion of changing to a non existent url I realized that
I needed to click the submit button.
It works fine.
Thanks,
John
On Thu, Mar 10, 2011 at 1:17 PM, Dave Metzler <metzler.dl at gmail.com> wrote:
> Actually, not true. Arrays work too. According to the api docs.
>
> Hm... Are you really sure that you are editing the right call? Try
> changing the url to non existant one and just inspecting the browser url to
> verify that there isn't something else stripping off the url.
>
> Sent from my iPad
>
> On Mar 10, 2011, at 9:54 AM, William Smith <william.darren at gmail.com>
> wrote:
>
> You didn't specify which version of Drupal you are using, but assuming
> Drupal 6 - drupal_goto expects $query to be a string, not an array.
>
> So: drupal_goto('admin/store/free_subscription', 'status=bye');
>
> William
>
> On Thu, Mar 10, 2011 at 12:46 PM, John Mitchell < <mitchelljj98 at gmail.com>
> mitchelljj98 at gmail.com> wrote:
>
>> When calling drupal_goto I can't seem to successfully pass a querystring
>> along with the url.
>>
>> below is my call to drupal_goto:
>> * $query = array();
>> $query['status'] = 'bye';
>> drupal_goto('admin/store/free_subscription',$query);*
>>
>> Within the called page I output the contents of the $_GET variable using:
>> *dd($_GET);*
>>
>> Below is contents of $_GET:
>> *Array
>> (
>> [q] => admin/store/free_subscription
>> )*
>>
>> Note: it has the *q *parameter but no *status *parameter.
>>
>> Any ideas on what I am doing wrong?
>>
>> Thanks,
>>
>> John
>>
>>
>
--
John J. Mitchell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110310/da496c0b/attachment.html
More information about the development
mailing list