我想检查是否单击了提交按钮。我以为我做对了,但它不起作用。我正在使用 twitterBootstrap 进行所有样式设置。
形式
<form class="form-horizontal" action="control/checkCall.php">
<div class="control-group">
<label class="control-label" for="inputUser" name="username">Gebruikersnaam</label>
<div class="controls">
<input type="text" id="inputUser" placeholder="Gebruikersnaam">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword" name="userpass">Wachtwoord</label>
<div class="controls">
<input type="password" id="inputPassword" placeholder="Wachtwoord">
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox"> Onthouden
</label>
<button type="submit" name="submitLogin" class="btn">Inloggen</button>
</div>
</div>
</form>
checkCall.php
if (isset($_POST['submitLogin'])){
echo 'hoi';
$username = $_POST['username'];
$userpass = md5($_POST['userpass']);
checkLogin($username,$userpass);
}
点击提交按钮产生的网址 http://inspired.xeption.nl/bootstrap/control/checkCall.php?submitLogin=