PHPプログラム開発のパラダイム学習のフォームはテキストボックスの値を取得します。


テキストボックスの使い方:のinputタイプはtext、passwordなどのタイプが含まれています。この実例の機能を見てください。

フォームの提出後:
実現コード:
 
<table width="283" height="85" border="1" cellpadding="0" cellspacing="0">
<form name="name1" method="post" action="abc.php">
<tr>
<td width="114" height="30" align="center" > :</td>
<td width="163" height="30" align="center"><input name="username" type="text" /></td>
</tr>
<tr>
<td align="center">   :</td>
<td height="30" align="center"><input name="password" type="password" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td height="25">&nbsp;&nbsp;<input name="submit" type="submit" value="submit" /></td>
</tr>
</form>
</table>
<?php
if(!isset($_POST['submit']))
return ;
if($_POST['submit']=='submit'){
$username = $_POST['username'];
$password = $_POST['password'];
}
echo <<<EOT
<table width="284" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="25" align="center"> :$username</td>
</tr>
<tr>
<td height="25" align="center" valign="middle" class="style2"> :$password</td>
</tr>
</table>
EOT;
?>
isset()関数を使って$uを判断します。POST['submit']が設定されていますか?