当前位置:Gxlcms > PHP教程 > php表单数据的获取代码_PHP

php表单数据的获取代码_PHP

时间:2021-07-01 10:21:17 帮助过:24人阅读

代码如下:


Form









代码如下:
//本程序用于接收来自HTML页面的表单数据,并输出每个字段
echo "用户的输入如下所示:
";
echo "姓名:".$_GET['username']."
";
echo "密码:".$_GET['password']."
";
echo "密码确认:".$_GET['password2']."
";
echo "性别:".$_GET['sex']."
";
echo "生日:".$_GET['birthday']."
";
echo "E-mail:".$_GET['email']."
";
echo "职业:".$_GET['job']."
";
?>


代码如下:
//本程序用于接收来自HTML页面的表单数据,并输出每个字段
echo "用户的输入如下所示:
";
echo "姓名:".$_POST['username']."
";
echo "密码:".$_POST['password']."
";
echo "密码确认:".$_POST['password2']."
";
echo "性别:".$_POST['sex']."
";
echo "生日:".$_POST['birthday']."
";
echo "E-mail:".$_POST['email']."
";
echo "职业:".$_POST['job']."
";
?>

人气教程排行