Hi,
I am new to PHP.

I am facing problem in both Get and Post method.
At first I tried with POST and given the error

Notice: Undefined variable: HTTP_POST_VARS

Then I changed to GET method and got the below
error
Notice: Undefined variable: HTTP_GET_VARS

Later I restarted Apache and tried the both, but could not found the solution.

    Hello,
    Sounds like you're using PHP 4.2+. The $HTTP_POST_VARS and $HTTP_GET_VARS have been dropped (unless you enable "register globals" in your directives). By default this is disabled. Take a look at the php.net site, you'll find a full explanation of the change.

    If you're not running that recent a version of PHP... Perhaps you are using object (class) coding... in this case you must "import" the variable into your method by using "global $HTTP_POST_VARS, $HTTP_GET_VARS;".

      I'm quite new and could not get sessions varaibles passed (4.2 +). Advice was given that php.ini globals should be set to on.
      That did not work in the end I used $HTTP_POST_VARS and $HTTP_GET_VARS expressly declared and it works.
      From your post its eems you advise to set globals to Off and not expressly declare - or have I misunderstood?

      Paul

        Use $GET and $POST and check - this is very important - if "track_vars" is enabled in your conf file.

          Write a Reply...