Add Form field value to the URL on submit

I have a form where the user input has to be send to another website in the URL.

I have tried it this way:

http://example.com/en/’ + city.value + ‘/apartments/listing/1?arrivalDate=’ + from.value + ‘&departureDate=’ + till.value + ‘&numPer=’ + persons.value; return false; + ‘/’ “>

But this opens the webpage in the same tab. Is there another way to achieve something like this? Maybe with PHP?


Source: javascript

Leave a Reply