效果如下:
输入数据提交
结果:
代码如下:
individual.php为设计信息输入页
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<form action="individualTest.php" method="post"><table width="387" border="1">
<tr>
<td width="96"> 昵称:</td>
<td width="275"><label for="user"></label>
<input type="text" name="user" id="user" /></td>
</tr>
<tr>
<td>E-mail:</td>
<td><label for="email"></label>
<input type="text" name="email" id="email" /></td>
</tr>
<tr>
<td>姓名:</td>
<td><label for="username"></label>
<input type="text" name="username" id="username" /></td>
</tr>
<tr>
<td>性别:</td>
<td><label for="sex"></label>
<input type="text" name="sex" id="sex" /></td>
</tr>
<tr>
<td>年龄:</td>
<td><label for="age"></label>
<input type="text" name="age" id="age" /></td>
</tr>
<tr>
<td>出生地:</td>
<td><label for="local"></label>
<input type="text" name="local" id="local" /></td>
</tr>
<tr>
<td>爱好:</td>
<td><label for="hoppy"></label>
<input type="text" name="hoppy" id="hoppy" /></td>
</tr>
<tr>
<td>个人说明:</td>
<td><label for="individual"></label>
<input type="text" name="individual" id="individual" /></td>
</tr>
<tr>
<td colspan="2">
<input type="submit" name="提交"/>
</td>
</tr>
</table>
</form>
</body>
</html>
individualTest.php为读取显示
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<?php
$user=$_POST["user"];
echo "昵称为:".$user;
echo "<br>";
$email=$_POST["email"];
echo "E-mail为:".$email;
echo "<br>";
$username=$_POST["username"];
echo "姓名为:".$username;
echo "<br>";
$sex=$_POST["sex"];
echo "性别为:".$sex;
echo "<br>";
$age=$_POST["age"];
echo "年龄为:".$age;
echo "<br>";
$local=$_POST["local"];
echo "出生地为:".$local;
echo "<br>";
$hoppy=$_POST["hoppy"];
echo "爱好为:".$hoppy;
echo "<br>";
$individual=$_POST["individual"];
echo "个人介绍:".$individual;
echo "<br>";
?>
</body>
</html>