title: How to dynamically generate a link with query
body: <p>Hi fellow developers, </p>
  
  <p>I want to integrate affiliate program for my website, to earn commissions from bookings made via my links. </p>
  
  <p>Since, I have those properties on my site as well, I need a user to be able to click "book it" and get redirected to a page on booking.com with that particular place highlighted.</p>
  
  <p>So the link has this params, which I need:</p>
  
  <p><a href="http://www.booking.com/searchresults.html?city=-2900142&amp;aid=814610&amp;checkin_monthday=25&amp;checkin_month=3&amp;checkin_year=2017&amp;checkout_monthday=30&amp;checkout_month=3&amp;checkout_year=2017&amp;no_rooms=1&amp;group_adults=1&amp;highlighted_hotels=2197459" rel="nofollow noreferrer">http://www.booking.com/searchresults.html?city=-2900142&amp;aid=814610&amp;checkin_monthday=25&amp;checkin_month=3&amp;checkin_year=2017&amp;checkout_monthday=30&amp;checkout_month=3&amp;checkout_year=2017&amp;no_rooms=1&amp;group_adults=1&amp;highlighted_hotels=2197459</a></p>
  
  <p>City = I have custom field for it,so wordpress can pick it with </p>
  
  <pre><code>get_post_meta(CityID)
  </code></pre>
  
  <p>Highlighted_hotels = makes this particular object highlighted if it's available, also I have it in custom field, so I can take it with </p>
  
  <pre><code>get_post_meta(HotelID)
  </code></pre>
  
  <p>But how do I take date values from dropdowns? And how do I make a link afterwards? with </p>
  
  <pre><code>&lt;?php echo '&lt;a href="http://www.booking.com/searchresults.html?';
  echo $city;
  echo $highlighted;
  echo $dates; 
  </code></pre>
  
  <p>Is this a correct method to create a link on wordpress? </p>
  
  <p>Btw, I'm using an official booking.com plugin right now, but it's broken and doesn't fill my needs, I want to change it with above custom code, but you can take a look at what I want to achieve on my site here for example (russian language) :
  <a href="http://sochi.asp.sale/nedvizhimost/chvizhepse/posutochno/kompleks-zolotoj-kashtan/" rel="nofollow noreferrer">http://sochi.asp.sale/nedvizhimost/chvizhepse/posutochno/kompleks-zolotoj-kashtan/</a></p>
  
  <p>Form is on the right side bottom.</p>
  
  <p>Any help much appreciated!</p>