简体   繁体   中英

username and password not found-php

I am trying to login in my site but at the time of login its showing that username and password not found in my login page. Please somebody help me

<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>

both input elements have "password" names in attributes. (The ids are different, but names are same). Change:

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

to

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

This line:

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

Should be changed to:

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

So that you don't have two inputs with the name password

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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