title: Echo value into hidden field?
body: <p>I am trying to find out and track what browser and if a proxy is being used when I receive form submissions. I have the following code below:</p>
  
  <pre><code>&lt;?php
  
  $browser = $_SERVER['HTTP_USER_AGENT'];
  $ip_address = $_SERVER['REMOTE_ADDR'];
  if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) {
      $ip_address = array_pop(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']));
  }
  
  ?&gt;
  </code></pre>
  
  <p>For example I tried the below but it does not work. It is not submitting any data with my form.</p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>echo ('&lt;input type="hidden" name="browser" value="' . $browser . '" /&gt;' );
  </code></pre>