title: PHP script to modify a dynamic website link and open a new tab
body: <p>This is my first question so if I am doing something wrong just let me know.
  I currently maintain a webserver running <code>ubuntu</code>, <code>php</code> and <code>mysql</code>.</p>
  
  <p>What I would like to do is add a new page to the site which shows a user a box where they can input text and when they click "Go" it modifies a URL and opens a new tab.</p>
  
  <p>For example the URL would look like the below.</p>
  
  <pre><code>http://1.2.4.5/api.php?getServices={"account":"variable"}
  </code></pre>
  
  <p>If the person was to input <code>12345</code> into the box and select Go it would modify the link to:</p>
  
  <pre><code>http://1.2.4.5/api.php?getServices={"account":"12345"}
  </code></pre>
  
  <p>I have attempted multiple different ways to implement this but had no luck so far and I can't seem to find any information about it online, could anyone give me a hand?</p>