Do you mean, how to set the route?
Router::connect('/showmonth/:year/:month',
array('controller' => 'expenses', 'action' => 'showMonth'),
array(
'year' => '[0-9]{4}',
'month' => '[0-9]{2}'
)
);
You can also do the regexp like so:
array(
'year' => '[12][0-9]{3}',
'month' => '0[1-9]|1[012]'
)
Then check $this->params in your controller.
On Mon, Dec 8, 2008 at 11:57 AM, Tanay <[EMAIL PROTECTED]> wrote:
>
> i have a class type "expenses"
>
> the index() function of controller lists all expenses'
>
> then i have a function show(month,year) which lists all expenses of
> that particular month,year
>
> in expenses home page i want to have a form with two select buttons
> such that i select month and year with values,
> so i inserted html for select button
>
> now on clicking submit button, i want the control to be taken to
> showmonth/month/year
> how can i do this?
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---