Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Passing GET arguments to dynpages plugin
#1
I am trying to pass arguments to a php script installed as a component.
The script component currently runs (with no arguments passed).
The script creates a web page that includes links like: http://my.site.com/index.php?id=home&myarg=test
and I would like to be able to get the value pair myarg=test in my php code.
(Note that I would like to be able to use POST as well eventually, but GET will work for now)

I have included the "global $args;" statement on the <?php line but apparently $args is empty.

The component is called "manuals" and the calling function from the page is {% manuals %}

I suppose I should place the $_GET values between "manuals" and "%}" but I have not been able to figure out if I can do that...

Thanks for any help.

Didier
Reply
#2
why pass them at all ?

just reference them in your components

PHP Code:
<?php
print_r
($_GET);
?>
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
(2015-01-07, 11:27:33)shawn_a Wrote: why pass them at all ?

just reference them in your components

PHP Code:
<?php
print_r
($_GET);
?>

Shawn,

That was too simple, did not think of it...

Thanks
Reply
#4
Php super globals they are called.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)