title: Generete Unique Id and pass into text field
body: <p>I am new to php and would like some help on solving a problem I am having. I have a form that has 3 visible input fields, Name, Email address, phone number. Also it includes 3 hidden fields, one is a value set to 2500, the second is a currency, the third needs to be a unique ID. I need help on how to generate a unique id and pass the text/value into a input field in another form. Below is my code. I need the random id to be displayed on the input field merchantid. Thanks</p>
  
  <pre><code>&lt;form action="https:urlthathastheform" method="post"&gt;
      &lt;input type="hidden" id="merchantid" name="merchantid" /&gt;  
      &lt;input type="hidden" id="currency" name="currency" value="$" /&gt;
  
      &lt;label for="names"&gt;Names&lt;/label&gt;
      &lt;input type="text" name="names" id="names" /&gt;
  
      &lt;label for="email_address"&gt;Email Address&lt;/label&gt;
      &lt;input type="text" name="email_address" id="email_address" /&gt;
  
      &lt;label for="phone_number"&gt;Phone Number&lt;/label&gt;
      &lt;input type="text" name="phone_number" id="phone_number" /&gt;
  
      &lt;label for="amount"&gt;Amount&lt;/label&gt;
      &lt;input type="text" name="amount" value="2500" /&gt;
  
      &lt;input type="submit" name="submit" value="submit" /&gt;  
  &lt;/form&gt;
  </code></pre>