未找到用户名和密码-php


username and password not found-php

我正在尝试登录我的网站,但在登录的时候显示,用户名和密码没有在我的登录页面中找到。谁来帮帮我

<script type="text/javascript">
    function register() {
        window.location = '<?= indexurl() ?>home/register';
    }
</script>
</head>
<body>
<div id="wrapper">
<div data-role="page" id="login" data-theme="b">
    <div data-role="header">
        <h3>Login to Account</h3>
    </div>
    <?php if ($this->ShowError == true) {?>
    <div>
        User name or password not found
    </div> 
    <?php } ?>
        <form method="post" action="<?= indexurl() . "home/do_login" ?>">
           <fieldset>
                 <div data-role="fieldcontain">                                      
                    <label for="username">Email:</label>
                    <input type="text" value="" name="password" id="username"/> 
                </div>                             
                <div data-role="fieldcontain">                                      
                    <label for="password">Enter your password:</label>
                    <input type="password" value="" name="password" id="password"/> 
                </div>
                <input type="submit" name="submit" id="login" value="Login">
                <input type="button" value="Register" onclick="register()">
            </fieldset>
        </form>                              
    </div>

这一行:

<input type="text" value="" name="password" id="username"/> 

应该改成:

<input type="text" value="" name="username" id="username"/> 

这样您就不会有两个带有名称密码

的输入

两个输入元素的属性中都有"password"名称。(id不同,但名称相同)。变化:

<input type="text" value="" name="password" id="username">

<input type="text" value="" name="username" id="username">