注册表单不会显示输入
Registration form won't display input
我正在制作注册表并做了一些简单的php来处理电子邮件作为测试:
Hello <?php echo $_POST["email"]; ?>
我正在使用 post 方法,虽然原子编辑器显示了你好,但它没有显示电子邮件。
如果有人需要,这是我正在使用的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>
此代码工作正常,请确保在 welcome.php
中回应 Hello <?php echo $_POST["email"]; ?>
如果是,请确保您已安装 php。
没有错误。如果您将上面提供的 php 代码放在 welcome.php 中,并填写表格,则电子邮件会在 Hello 后正确显示。可能有
我正在制作注册表并做了一些简单的php来处理电子邮件作为测试:
Hello <?php echo $_POST["email"]; ?>
我正在使用 post 方法,虽然原子编辑器显示了你好,但它没有显示电子邮件。
如果有人需要,这是我正在使用的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>
此代码工作正常,请确保在 welcome.php
中回应 Hello <?php echo $_POST["email"]; ?>
如果是,请确保您已安装 php。
没有错误。如果您将上面提供的 php 代码放在 welcome.php 中,并填写表格,则电子邮件会在 Hello 后正确显示。可能有