class ModuleTest extends CodonModule
{
public function pageone($fruit='', $orange='')
{
echo "The fruit is an {$fruit} and the color is {$orange}";
}
public function pagetwo()
{
echo "The fruit is an {$this->get->fruit} and the color is {$this->get->orange}";
}
}
As you can see, the "pageone" method is cleaner - the function parameters will be the variables after the function name in the URL, in the order they appear in the URL.
The "pagetwo" method is the more "traditional" way of doing things, but they are essentially the same thing. To access the variables in the query string you use:
Recommended Comments
There are no comments to display.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.