Re: Passing variables in URl

2007-05-08 Thread xavi
hi! imagine this URL http://domain/mycontroller/myaction/param1/param2 In your MycontrollerController.php you must have a "myaction" action, and you can read the params with something like this: function myaction($param1 = null, param2=null){ } Bye On 7 mayo, 15:54, Enchy <[EMAIL PROTECTE

Re: Passing variables in URl

2007-05-07 Thread Samuel DeVore
the are some other ways as well you can use func_get_args to get a variable number of args see http://php.net/func_get_args now this does require you do keep the args in order, also cakephp 1.2 you can use named args like index.php?/app/index/first:John/last:Smith that are mapped to $this->name

Re: Passing variables in URl

2007-05-07 Thread Walker Hamilton
yes, make sure your controller's function has standard php method of making a variable optional. On May 7, 9:47 am, Enchy <[EMAIL PROTECTED]> wrote: > Oh nvm I discovered the set function. > > But now I have another problem , it blurts out an error if I dont send > a variable. > Does anybody have

Re: Passing variables in URl

2007-05-07 Thread Enchy
Oh nvm I discovered the set function. But now I have another problem , it blurts out an error if I dont send a variable. Does anybody have solution for this? L On May 7, 3:54 pm, Enchy <[EMAIL PROTECTED]> wrote: > Hi > > New to this. > > How do you pass variables in the URL in cakephp > > inde

Passing variables in URl

2007-05-07 Thread Enchy
Hi New to this. How do you pass variables in the URL in cakephp index.php?/app/index/name/John Is this how you do it? and how do you print it in thml files Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups