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

Community
  • 1
  • 1
Bkay
  • 177
  • 2
  • 4
  • 16
  • 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. – deceze Dec 01 '12 at 12:08

2 Answers2

2

in place of global variable you can use session variables

Man Programmer
  • 5,300
  • 2
  • 21
  • 21
2

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

arma
  • 4,084
  • 10
  • 48
  • 63