phpbbフォーラムのカスタムログインページを作成しました。現在、ユーザーは「ユーザー名」と「パスワード」を入力します。私のユーザーの大多数は岩のように愚かなので、「username」入力ボックスを2つの「firstName」と「lastName」入力ボックスに変更しました。私がこれまでに持っているもの[これは.phpファイルです]:
<form action="./ucp.php?mode=login" method="post">
<fieldset>
<!-- my new input boxes -->
<label for="username">First name:</label>
<input type="text" name="firstname" id="firstname" size="10" title="Firstname" ><br><br>
<label for="username">Last name:</label>
<input type="text" name="lastname" id="lastname" size="10" title="Lastname" ><br><br>
<!-- original input box; now hidden -->
<label for="username">Username:</label>
<input type="hidden" name="username" id="username" size="10" title="Username" />
<label for="password">Password:</label>
<input type="password" name="password" id="password" size="10" title="Password" />
<br><label for="autologin">Log me on automatically each visit
<input type="checkbox" name="autologin" id="autologin" /></label>
<br><input type="submit" name="login" value="Login" />
</fieldset>
</form>
「firstname」フィールドと「lastname」フィールドを連結して単一の「username」変数を作成する方法を知りたいです。私はjavascriptを使用しないソリューションを好みますが、簡単な代替手段がない場合は、それを採用すると思います。