PHP - How to echo profile page after form submit

139 views Asked by At

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.

1

There are 1 answers

2
cjds On BEST ANSWER

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

?>