Re: variable to string

2009-07-20 Thread paulos nikolo
Ty so much brian.You have helped me a lot since i started to bake.You rock!

2009/7/16 brian 

>
> You should get the value from $this->data['Destination']['place']
>
> On Thu, Jul 16, 2009 at 5:09 AM, Paulos23 wrote:
> >
> > Hi people,
> > i am facing a problem with my app.In particular i use httpsocket for a
> > request in an external site to get some information.I have an element
> > to force user put some name:
> >
> > create('Destination', array
> > ('controller'=>'destinations','action' =>'search')));?>
> >
> >input('place', array('label'=> 'Search
> > Location:'));?>
> >
> >
> >  submit('Search', array('div' => false,'class'
> > => 'submitbutton'))); ?>
> >  end()); ?>
> >
> >
> > now in my controller i have a search function where i want to take the
> > place variable as a parameter so i do:
> >
> > function search($place=null) {
> > App::import('Core', 'HttpSocket');
> >App::import('Xml');
> >$HttpSocket = new HttpSocket();
> >
> >$results = $HttpSocket->get('
> http://ws.geonames.org/search?', 'q='.
> > $place.'&maxRows=10');
> >
> > I am doing this '.$place.' to take place as a string but it doesnt
> > work.Any help to this plz?
> >
> > Ty v much!
> > Paulos
> >
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: variable to string

2009-07-16 Thread brian

You should get the value from $this->data['Destination']['place']

On Thu, Jul 16, 2009 at 5:09 AM, Paulos23 wrote:
>
> Hi people,
> i am facing a problem with my app.In particular i use httpsocket for a
> request in an external site to get some information.I have an element
> to force user put some name:
>
> create('Destination', array
> ('controller'=>'destinations','action' =>'search')));?>
>
>        input('place', array('label'=> 'Search
> Location:'));?>
>
>        
>      submit('Search', array('div' => false,'class'
> => 'submitbutton'))); ?>
>          end()); ?>
>        
>
> now in my controller i have a search function where i want to take the
> place variable as a parameter so i do:
>
> function search($place=null) {
> App::import('Core', 'HttpSocket');
>                App::import('Xml');
>                $HttpSocket = new HttpSocket();
>
>                $results = $HttpSocket->get('http://ws.geonames.org/search?', 
> 'q='.
> $place.'&maxRows=10');
>
> I am doing this '.$place.' to take place as a string but it doesnt
> work.Any help to this plz?
>
> Ty v much!
> Paulos
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---