Sunday, April 29, 2012

Re: How can I pass parameters to controller/action not in URL?

I guess this could work. I just don't think of session variables as a way to pass parameters from one routine to another.

seems like there may be way for session info to get messed up between calls?

On 4/28/2012 8:53 PM, Alejandro Gómez Fernández [via CakePHP] wrote:
Did you try with session variables?




Enviado desde mi iPad

El 28/04/2012, a las 21:23, bs28723 <[hidden email]> escribió:

I looked at routing, but I did not see a way to solve my problem.

I am looking for a way to create links to controller/actions and pass "large" or 'hidden' parameters.
I could use a from and post, but seems like a lot of work for 1 or 2 links in a view.

I understand the simple link call with 1 parameter.
echo  $html->link('View Post',  array('controller'  =>  'posts',  'action'  =>  'view',  5));

But, how can I pass large strings like

$largestring = "This is a large string that could be over 255 characters
long and might contain html special characters";

echo  $html->link('Update Post',  array('controller'  =>  'posts',  'action'  =>  'update',  $largestring));

or
$hidden = "password"; // or a variable I don't want to show in URL.

echo  $html->link('Unlock Safe',  array('controller'  =>  'safes',  'action'  =>  'unlock',  $hidden));

Is the only option to make these views forms and make these buttons, so I can
parse passed in variables using request->data?

Thanks,
Bill



View this message in context: How can I pass parameters to controller/action not in URL?
Sent from the CakePHP mailing list archive at Nabble.com.
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php



If you reply to this email, your message will be added to the discussion below:
http://cakephp.1045679.n5.nabble.com/How-can-I-pass-parameters-to-controller-action-not-in-URL-tp5673358p5673374.html
To start a new topic under CakePHP, email [hidden email]
To unsubscribe from CakePHP, click here.
NAML


View this message in context: Re: How can I pass parameters to controller/action not in URL?
Sent from the CakePHP mailing list archive at Nabble.com.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: