title: Concatenate input values html/php
body: <p>I've made a custom login page for a phpbb forum. Currently the user inputs a "username" and a "password." Since the majority of my users are dumb as a rock, I changed the "username" input box into two "firstName" and "lastName" input boxes. What I have so far [this is a .php file]:</p>
  
  <pre><code>&lt;form action="./ucp.php?mode=login" method="post"&gt;
      &lt;fieldset&gt;
          &lt;!-- my new input boxes --&gt;
          &lt;label for="username"&gt;First name:&lt;/label&gt;&amp;nbsp;
          &lt;input type="text" name="firstname" id="firstname" size="10" title="Firstname" &gt;&lt;br&gt;&lt;br&gt;
          &lt;label for="username"&gt;Last name:&lt;/label&gt;&amp;nbsp;
          &lt;input type="text" name="lastname" id="lastname" size="10" title="Lastname" &gt;&lt;br&gt;&lt;br&gt;
  
          &lt;!-- original input box; now hidden --&gt;
          &lt;label for="username"&gt;Username:&lt;/label&gt;&amp;nbsp;
          &lt;input type="hidden" name="username" id="username" size="10" title="Username" /&gt;
  
          &lt;label for="password"&gt;Password:&lt;/label&gt;&amp;nbsp;
          &lt;input type="password" name="password" id="password" size="10" title="Password" /&gt;
  
          &lt;br&gt;&lt;label for="autologin"&gt;Log me on automatically each visit
          &lt;input type="checkbox" name="autologin" id="autologin" /&gt;&lt;/label&gt;
  
          &lt;br&gt;&lt;input type="submit" name="login" value="Login" /&gt;
      &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I want to know how to how to concatenate the "firstname" and "lastname" fields to make a single "username" variable. I would prefer a solution that does not use javascript, although if there is no easy alternative, I guess I'll take one.</p>