我希望用户像这样填写注册:
<h1>Enlistment Form</h1>
<form name="input" action="http://spartancorps-gil.comyr.com/Enlistment.php" method="get">
<p>First Name?: </p>
<input type="text" name="FirstName" value="" />
<p>Last Name?: </p>
<input type="text" name="lastname" value=""/>
<input type="submit" value="Submit" />
</form>
它使用这个 php 发送到服务器:
<html>
<head>
<title>A BASIC HTML FORM</title>
<?PHP
$Firstname = $_POST['FirstName'];
print ($Firstname);
$Lastname = $_POST['lastname'];
print ($Lastname);
</head>
</html>
由于某种原因,它没有打印出这些值。我在这里想念什么?