Hi Cake ppl, First of all i want to ty for your replies and your efforts for all of us! To get to the point i want to make a search action with the relevant search textfield in order to search for locations.Now the specific location will handle a site "http://www.geonames.org/export/geonames- search.html" which takes some parameters for that location.Let's say that according to the API i want 1 parameter which is the q.So when the user hits one location i want to get the returned data and show to him.The returned data is in XML format so i have to parse it.I am wonder if my search function is fine coz when i hit a location nothing happened.If anyone has an opinion plz let me know. Here is my code to help you as much i can.
Controller: <?php class DestinationsController extends AppController { var $name = 'Destinations'; function beforeFilter() { parent::beforeFilter(); $this->Auth->allow('*'); } function search() { $this->layout ='search'; App::import('Core', 'HttpSocket'); $HttpSocket = new HttpSocket(); $results = $HttpSocket->get('http://ws.geonames.org/search?', 'q=name'); } } ?> View: <div id="search_dest"> <?php echo ($form->create('Destination', array ('controller'=>'destinations','action' =>'search')));?> <fieldset> <?php echo $form->input ('name', array('type' => 'text', 'label'=> 'Search Location:'));?> </fieldset> <br> <?php echo ($form->submit('Search', array('div' => false,'class' => 'submitbutton'))); ?> <?php echo($form->end()); ?> </div> Ty in advance! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---