我的验证工作正常,但我只想输出它,当它已提交但 isset 也不为空似乎出于某种原因对我有用?我正在使用 php 5.5.3 我相信
我的代码:
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" name="register">
<input type="text" placeholder="Username" maxlength="15" name="username"/><br>
<input type="password" maxlength="15" name="password1"/><br>
<input type="password" maxlength="15" name="password2" /><br>
<input type="text" placeholder="your@email.com" maxlength="25" name="email"/><br>
<input type="text" maxlength="20" name="county" /><br>
<input type="submit" value="Register" name "register"/>
</form>
<?php
//Form Validation
if(empty($_POST['register']))
{
echo "Option A <br>";
}
else
{
echo "Option B <br>";
}
另外,我不记得如果验证正常,我将如何为该用户输入相同的信息?
value="<?php $_POST['stuff'] ?>