1

Can you save a variable to post in php to pickup on another page? I only know how to retrieve a post variable, or is this where you should use session instead. I don't want to save my variable on the end of the url and use get.

2
  • Are you calling the other page from the PHP script? If so, how are you doing this? e.g. by calling its URL, or including it in the current script? Commented Mar 1, 2012 at 17:05
  • 1
    Use session variables instead. Commented Mar 1, 2012 at 17:07

2 Answers 2

3

This is where you might want to use $_SESSION variables, instead of $_POST.

See: http://php.net/manual/en/reserved.variables.session.php

Sign up to request clarification or add additional context in comments.

Comments

0

Where is the data you're wanting to pickup on the next page coming from? A form? Or what?

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.