-1

ログイン資格情報のテーブルを作成しようとしています。ユーザー名とパスワードを受け取り、POST 経由で送信できるログイン ボタンがあります。情報をhtmlテーブルに表示したいと思います。私の index.html は次のようになります。

<html><head>
<title>Login</title>
</head>
<body style="left:-1px; top:-2px; " >
<form action="index.html" method="post" >
Email<input type="email" name="data" value="" />
Password<input type="text" name="pass" value="" />
<input type="submit" />

<?php 
$index = 0;
$credentials = array{usernames,};
if (isset($_POST['submit']) { //to check if the form was submitted
    $username= $_POST['data'];
     $password= $_Post['pass'];
    //$result = array($username,$password);

    $credentials['usernames'].append($username);
    $credentials['passwords'].append($password);


    }
?>


</form>
<table>
<tbody><tr><th>Usernames</th>
<th>Passwords</th>
<?php for($i = 0; $i < $credentials.length; $i++){ <tr><?php echo $credentials[i]?></tr><tr><?php echo $credentials[password[i]]?></tr><tr>
</body><html>

私は何を間違っていますか?

4

1 に答える 1