title: how to change input text into url link
body: <p>I have four input texts and one submit button 
  <a href="https://i.stack.imgur.com/sghdl.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>what I want is for the results of the input text to turn into a link that I use as a whatsapp message like this.</p>
  
  <p><code>https://wa.me/628123456789?text=Hai%20My%20Name%20Andi</code></p>
  
  <p>what should i do?
  this is my code</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;!-- https://wa.me/628123456789?text=textInput1%20textInput2%20textInput3%20textInput4 --&gt;
      &lt;form action="https://wa.me/628123456789?text=textInput1%20textInput2%20textInput3%20textInput4" method="post"&gt;
    &lt;input type="text" name="textInput1" id="textInput1" &gt;&lt;br&gt;&lt;br&gt;
    &lt;input type="text" name="textInput2" id="textInput2" &gt;&lt;br&gt;&lt;br&gt;
    &lt;input type="text" name="textInput3" id="textInput3" &gt;&lt;br&gt;&lt;br&gt;
    &lt;input type="text" name="textInput4" id="textInput4" &gt;&lt;br&gt;&lt;br&gt;
  
    &lt;input type="submit" name="submit" value="Submit"&gt;
  &lt;/form&gt;
  
    &lt;?php 
        //target url --&gt; https://wa.me/628123456789?text=textInput1%20textInput2%20textInput3%20textInput4
    $url = null;
    if(isset($_POST['submit']))
    {
      $textInput1 = $_POST['textInput1'];
      $textInput2 = $_POST['textInput2'];
      $textInput3 = $_POST['textInput3'];
      $textInput4 = $_POST['textInput4'];
      $url = "https://wa.me/628123456789?text=".$textInput1." ".$textInput2." ".$textInput3." ".$textInput4;
    }
     ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>this is var_dump result for my code</p>
  
  <p><a href="https://i.stack.imgur.com/sxHwn.png" rel="nofollow noreferrer">enter image description here</a></p>