WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
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 '11 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 '11 at 22:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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