我正在尝试登录我的网站,但在登录时显示在我的登录页面中找不到用户名和密码。 请有人帮助我
<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"/>
这样你就没有两个名称为密码的输入了
关于php - 找不到用户名和密码-php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31443085/