1

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?

1 Answer 1

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.

2
  • I will probably end up doing this. Thank-you for the input. Any ideas on session data without using php's built in session variable? I suppose I could use cookies. Is there an area of wordpress where one would typically store some global settings?
    – mrtsherman
    Apr 18, 2011 at 22:05
  • Ask a new question with more details regarding what you're trying to do with sessions. In WordPress, there are several ways to get around using sessions ... transients, cookies, etc ... but it depends on what exactly you're trying to accomplish.
    – EAMann
    Apr 18, 2011 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.