PHP - 如何在表单提交后回显个人资料页面
PHP - How to echo profile page after form submit
我在 PHP 还很陌生。我正在为客户创建员工管理系统,我想创建一个唯一的 link 并在用户使用表单提交新配置文件后回显结果。
换句话说,在表单提交时,创建独特的页面,然后回显。
我一直在谷歌搜索,但我认为我使用的术语不正确。
您要查找的是 URL 参数。
当您向特定 URL 提交表单时,它会通过 URL 参数发送所有表单数据。
根据提交的类型 GET
或 POST
您可以在 URL 中看到或看不到数据。
获取数据
第 1 页
<form method='POST' action='a.php'>
<input type ='text' name='hi' />
</form>
第 2 页
<?php
echo $_POST['hi']; //this is how you access post and they are stored in a key value pair
//with the key being the name. $_GET for get
?>
我在 PHP 还很陌生。我正在为客户创建员工管理系统,我想创建一个唯一的 link 并在用户使用表单提交新配置文件后回显结果。
换句话说,在表单提交时,创建独特的页面,然后回显。
我一直在谷歌搜索,但我认为我使用的术语不正确。
您要查找的是 URL 参数。
当您向特定 URL 提交表单时,它会通过 URL 参数发送所有表单数据。
根据提交的类型 GET
或 POST
您可以在 URL 中看到或看不到数据。
获取数据
第 1 页
<form method='POST' action='a.php'>
<input type ='text' name='hi' />
</form>
第 2 页
<?php
echo $_POST['hi']; //this is how you access post and they are stored in a key value pair
//with the key being the name. $_GET for get
?>