How to pass form values to a url

Am about to fetch JSON values which returns different values for different url. Which means I want to get values from input fields and pass the value to url like.
http://something.com/available.php?origin="{{origin}}"&destination="{{destination}}"&depart_date="{{date}}""

Is this possible to add values in URL ?

Hey @dilipwk: I actually wrote a tutorial that goes step by step in explaining how to POST data from an Ionic app to a PHP server: http://www.nikola-breznjak.com/blog/codeproject/posting-data-from-ionic-app-to-php-server/

Please let me know if this will help. The code is also on Github: https://github.com/Hitman666/IonicServerSave

1 Like

Hi Hitma,

My question is not about passing values to php. It’s about generating dynamic url depending on user input.

Did you actually read the tutorial or you just saw the title and concluded it’s not what you need?

This is not an Ionic question, it’s even slightly related to angularJS, it’s a pure javascript question that you’ll easily find on Google or stackoverflow.

 <div >     
 <select ng-model="origin" ng-options="cities as cities.name for cities in cities" >

Selected value: {{origin.name}}

Way to get value of select options.