Php 引导形式:它不';t检索POST数据。有了它
用bootstrap的类实现表单,在第一页中我编写了以下代码Php 引导形式:它不';t检索POST数据。有了它,php,forms,twitter-bootstrap,post,get,Php,Forms,Twitter Bootstrap,Post,Get,用bootstrap的类实现表单,在第一页中我编写了以下代码 <form action="dologin.php" method="post"> <input type="text" name="email" class="form-control" placeholder="Username"> <input type="password" name="password" class="form-control" placeholder="Password">
<form action="dologin.php" method="post">
<input type="text" name="email" class="form-control" placeholder="Username">
<input type="password" name="password" class="form-control" placeholder="Password">
<input type="image" src="img/login.png" alt="Login">
</form>
它不工作,它什么也不打印
但是如果我使用get方法,在第一页:
<form action="dologin.php" method="get">
<input type="text" name="email" class="form-control" placeholder="Username">
<input type="password" name="password" class="form-control" placeholder="Password">
<input type="image" src="img/login.png" alt="Login">
</form>
它可以打印表单中输入的内容
谢谢你的帮助。试试这个:-
<form action="dologin.php" method="post">
<input type="text" name="email" class="form-control" placeholder="Username">
<input type="password" name="password" class="form-control" placeholder="Password">
<input type="image" src="img/login.png" type="submit" alt="Login">
</form>
我相信这与“图像”输入有关。 您是否考虑过使用按钮元素
<button type="submit" name="someName" value="someValue"><img src="someImage.png" alt="SomeAlternateText"></button>
您的评论是否完整?类型“image”已经是提交类型。另外,第二个
type
属性将覆盖第一个属性。
<form action="dologin.php" method="post">
<input type="text" name="email" class="form-control" placeholder="Username">
<input type="password" name="password" class="form-control" placeholder="Password">
<input type="image" src="img/login.png" type="submit" alt="Login">
</form>
email = $_POST['email'];
echo $email;
<button type="submit" name="someName" value="someValue"><img src="someImage.png" alt="SomeAlternateText"></button>