我正在尝试为学校项目的网站制作一个登录表格。
When a certain username and password is entered it can then go through to the next page, The part that I am having trouble with is figuring out whether I can assign a variable to a href
or button
.
for example, the href
has the variable of 'A' and the password input has a variable of 'B' and there is a php code saying:
If (B == ('Qwerty')) then
A == 'google.com';
else
echo ('Wrong password')
我知道此示例代码可能做错了,但是如果有人了解我要问/做的事情,您能帮忙吗? 如果这有帮助,这就是我所拥有的。
<div class="col-md-4 form-group" data-for="password">
<label for="password-form1-2" class="form-control-label mbr-fonts-style display-7">Password</label>
<input type="password" name="email" data-form-field="password" required="required" class="form-control display-7" id="password-form1-2" placeholder="qwerty">
</div>
<div class="col-md-12 input-group-btn align-center">
<button type="submit" class="btn btn-primary btn-form display-4" onclick="window.location.href = '2after login.php';">Log in</button>
</div>