我希望 PHP 脚本将它从 html 页面获取的所有值打印到屏幕上。
这是 HTML 代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
<title>Insert title here</title>
</head>
<body>
<div>
<form enctype="multipart/form-data" action="rect.php" method="post">
<label>Name:</label><input type="text" name="name"><br />
<label>Family Name:</label><input type="text" name="family"><br />
<label>Age:</label><input type="text" name="age"><br />
<input type="button" value="Print">
</form>
</div>
</body>
</html>
//这是PHP代码:
<?php
$name = $_REQUEST['name'];
$family_name = $_REQUEST['family'];
$age = $_REQUEST['age'];
print $name.$family_name.$age;
?>