Can you keep session data for visitors?

I read that you can use session_start() in config.php, but that it is not recommended.

I have a form where a user fills out their name and submits. On confirmation of the submission they land on a new page that says ‘Thank-you First Last.’ What is the preferred way of passing this information from page1 on to page2?

Related posts

Leave a Reply

1 comment

  1. 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.