Whatever works.
Overall I'd probably not do it this way altogether though,
since an accidental GET refresh would loose that data.. ( I suppose
you're trying to move between forms ).
I would store the user in the session under a temporary namespace.
This way the data will stick better and you only need one call..

$user = $this -> getUser() -> getAttribute("user", array(),
"temp_user");

Just my 2 cents.

Daniel


On Feb 4, 11:43 am, Frank He <hexuf...@gmail.com> wrote:
> I figured out this solution, I think it is much simple
>
>     if($this->hasRequestParameter("users")){
>         $user = $this->getRequestParameter("users");
>        }else{
>         $user = $request->getParameterHolder()->getAll();
>        }
>
> On Wed, Feb 4, 2009 at 2:40 PM, Richtermeister <nex...@gmail.com> wrote:
>
> > Hi Frank..
>
> > You're have to pass a multidimensional array then.
> > Just loop over your original array, and change every array key into
> > the user[fieldname] format.
> > Then it works.
>
> > Daniel
>
> > On Feb 4, 11:19 am, Frank He <hexuf...@gmail.com> wrote:
> > > Yes thanks.
> > > But only a little problems here.
> > > The passed array is
> > > $user = $this->getRequestParameter("users");
> > > As I set the name of form field to be user[]...
> > > but when I use http_build_query($user), it convert the array into
> > > self_gender=1&search_gender=0&country_code=CA...
> > > I can no longer access it by    $user =
> > $this->getRequestParameter("users");
>
> > > Any solution?
>
> > > On Wed, Feb 4, 2009 at 2:12 PM, Tom Haskins-Vaughan <
>
> > > t...@templestreetmedia.com> wrote:
>
> > > > Is this what you mean:
>
> > > >http://us2.php.net/manual/en/function.http-build-query.php
>
> > > > xhe wrote:
> > > > > I just forgot and can not find it.
> > > > > I want to convert a long PHP array into post string, I remember a
> > > > > function exist that can easily convert array to post string so that I
> > > > > can pass to the next page. I need this in the paginator.
>
> > > > > Thanks
>
> > > > --
> > > > Tom Haskins-Vaughan
> > > > Temple Street Media: Design and Development for the Web
> > > > t...@templestreetmedia.com |www.templestreetmedia.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to