php - 注册表不显示输入
问题描述
我正在制作一个注册表单并制作了一些简单的 php 来处理电子邮件作为测试:
Hello <?php echo $_POST["email"]; ?>
我正在使用 post 方法,虽然 atom 编辑器显示 Hello,但它不显示电子邮件。
如果有人需要它,这是我正在使用的 html:
<form action="welcome.php" method="post">
<div class="container">
<h1>Register</h1>
<p>Please fill in this form to create an account.</p>
<hr>
<label for="email"><b>Email</b></label>
<input type="text" placeholder="Enter Email" name="email" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw"
required>
<label for="psw-repeat"><b>Repeat Password</b></label>
<input type="password" placeholder="Repeat Password" name="psw-
repeat"
required>
<hr>
<p>By creating an account you agree to our <a href="#">Terms &
Privacy</a>.</p>
<button type="submit" class="registerbtn">Register</button>
</div>
<div class="container signin">
<p>Already have an account? <a href="#">Sign in</a>.</p>
</div>
</form>
解决方案
没有错误。如果将上面提供的php代码放在welcome.php中,并填写表格,在Hello之后可以正常显示email。有可能
推荐阅读
- mips - 树的递归过程高度
- ios - 如何将 SCNPlane 颜色更改为清晰颜色
- scala - Scala:用于定义多个编号的类参数的语法糖?
- vba - 使用 VBA 将 Excel 数据复制到精确的 PowerPoint 幻灯片单元格
- drupal-8 - Drupal 8:引用段落中的视图创建的块(作为字段)
- c# - 在 C# 中读取肥皂 XML 正文
- python - 用 O(n) RunTime 计算列表中相邻的较小数字?
- google-maps - 使用谷歌地图 API 创建具有转弯导航功能的移动应用程序
- ruby-on-rails - 在 Rails 中为类命名空间的快捷方式
- apache-spark - 加入 PySpark 会产生意想不到的结果