简体   繁体   English

PHP-表单提交后如何回显个人资料页面

[英]PHP - How to echo profile page after form submit

I am fairly new at PHP. 我是PHP的新手。 I am creating a staff management system for a client, and I want to create a unique link and echo the result after the user submits a new profile using a form. 我正在为客户创建人员管理系统,我想创建一个唯一的链接,并在用户使用表单提交新的个人资料后回显结果。

In other words, on form submit, create unique page, and echo. 换句话说,在表单上提交,创建唯一页面并回显。

I've been googgling around but I don't think I am using the right term. 我一直在闲逛,但我认为我使用的术语不正确。

What your looking for is URL parameters. 您要寻找的是URL参数。

When you submit a form to a particular URL it sends all the form data via the URL parameters. 当您将表单提交到特定的URL时,它将通过URL参数发送所有表单数据。

Depending on the type of submit GET or POST you can see the data in the URL or not. 根据提交GETPOST的类型,您是否可以在URL中看到数据。

To fetch the data 提取数据

1st page 第一页

<form method='POST' action='a.php'>
 <input type ='text' name='hi' />
</form>

2nd Page 第二页

<?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

?>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM