简体   繁体   中英

PHP - How to echo profile page after form submit

I am fairly new at 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.

When you submit a form to a particular URL it sends all the form data via the URL parameters.

Depending on the type of submit GET or POST you can see the data in the URL or not.

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

?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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