作者在 2010-12-03 05:12:47 发布以下内容
<!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=gb2312" />
<title>php外部变量</title>
</head>
<body>
<?php
$user=$_POST['user'];
echo "姓名;$User[name]<br>\n";
echo "姓别;$User[sex]<br>\n";
echo "邮箱;$User[email]<br>\n"
?>
</body>
</html>
这是我定义6.php页面<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>php外部变量</title>
</head>
<body>
<?php
$user=$_POST['user'];
echo "姓名;$User[name]<br>\n";
echo "姓别;$User[sex]<br>\n";
echo "邮箱;$User[email]<br>\n"
?>
</body>
</html>
<!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=gb2312" />
<title>一个简单html表单</title>
</head>
<body>
<form action="6.php" method="POST">
Name: <input type="text" name="User[name]"><br>
Gender:男<input name="User[sex]" type="radio" value="男性" />
女<input name="User[sex]" type="radio" value="女性" />
<br />
Email:
<input type="text" name="User[email]"><br>
<input type="submit"value="Submit me!">
</form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>一个简单html表单</title>
</head>
<body>
<form action="6.php" method="POST">
Name: <input type="text" name="User[name]"><br>
Gender:男<input name="User[sex]" type="radio" value="男性" />
女<input name="User[sex]" type="radio" value="女性" />
<br />
Email:
<input type="text" name="User[email]"><br>
<input type="submit"value="Submit me!">
</form>
</body>
</html>
这是编程难点,我想写进日志,回过头看看。