繁体   English   中英

找不到用户名和密码-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>

两个输入元素在属性中均具有“密码”名称。 (ID不同,但名称相同)。 更改:

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

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

这行:

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

应更改为:

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

这样您就不会有两个输入,且输入名称为password

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM