I would recommend using $_GET
or $_POST
variables … the same way you submit the form. This has nothing to do with session.
Basically, when the user fills out the form, you’re populating $_POST
with information. When the user submits the form, you process the information in $_POST
and display a thank you page … you’ll have access to the first and last name at this time.