<form action="log.php" method="POST">
<div class="form-group has-feedback">
<input type="email" class="form-control" name="email" placeholder="Email" required>
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" class="form-control" name="password" placeholder="Password" required>
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
</div><!-- /.col -->
<div class="col-xs-4">
<input type="submit" name="submit" class="btn btn-primary btn-block btn-flat" value="Sign In" />
<!--<button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>-->
</div><!-- /.col -->
</div>
</form>
答案 0 :(得分:0)
假设&#39; log.php&#39;我写这篇文章是为了帮助您确认表格已经提交。
将以下内容放入您的&#39; log.php&#39;档案:
echo $_POST['email']; //should diplay the email id entered in the form
echo $_POST['password']; //should display the password entered
在添加上述代码之前,请确保您的log.php
具有以下结构:
<html>
<body>
<!--Something that you already have-->
<?php
//all the code including what I have mentioned above.
?>
</body>
</html>
将显示表单中输入的电子邮件ID和密码。这意味着表单已提交。
如果没有显示,请检查log.php
是否与放置html表单的目录相同。