-1

Possible Duplicate:
PHP Pass variable to next page

Is it possible to use super global variables on another page. Basically I have two pages form.php and search.php. I'm calling search.php using ajax on submit button on-click also I am using method post and without action. If I try to use super global variable in search.php which is in form.php then it gives error for undefined variable. I don't want to use session, cookies or $_get. I have to fetch data from MySQL using those vaiables.

1
  • 1
    I don't care if you don't want to use cookies, sessions or $_GET. Globals, even super globals, don't persist across requests. Full stop. Only cookies/sessions do or any data you pass in the URL/request itself. There's no alternative. Commented Dec 1, 2012 at 12:08

2 Answers 2

2

You have to include one page in another or create 3rd page with your variables.
Or you just use session superglobal.

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

Comments

2

in place of global variable you can use session variables

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.