strange POST vs GET behaviour

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • flits@flats.nl

    #1

    strange POST vs GET behaviour

    LS

    I have set up my first Linux box. But I experience some strange POST
    behaviour. Maybe this is a know bug or maybe I have done something
    wrong with my setup. But I just can't seem to find any solution about
    it on google.

    I have the following two scripts:

    1.php:

    <form name="input" action="2.php" method="post">
    to pass: <input type="text" name="pass">
    <input type="submit" value="Submit">
    </form>

    2.php:

    <?php

    echo "passed: ".$_POST['pass'];

    echo "<pre>";
    print_r($_REQUE ST);
    echo "</pre>";

    ?>

    This results in:

    Notice: Undefined index: pass in /var/www/2.php on line 3
    passed:

    Array
    (
    )

    The above script doesn't pass the POST. But when I change it to GET it
    does get passed to 2.php. Does anyone have an idea?

    I am using:

    Debian 3.1r4
    Apache v1.3.33
    PHP v4.3.10-18

    Kind regards,
    Flits.
  • Janwillem Borleffs

    #2
    Re: strange POST vs GET behaviour

    flits@flats.nl wrote:
    This results in:
    >
    Notice: Undefined index: pass in /var/www/2.php on line 3
    passed:
    >
    Array
    (
    )
    >
    The above script doesn't pass the POST. But when I change it to GET it
    does get passed to 2.php. Does anyone have an idea?
    >
    Check the output of phpinfo() to see if it gets anywhere. Also, check the
    output of both $HTTP_POST_VARS and $_REQUEST['HTTP_POST_VARS '].

    Perhaps you upgraded from a pre-4.2 version and some old bits and pieces
    where left. You can also try to rename the php.ini file to php.ini.old and
    restart your webserver. After this, PHP should resort to its defaults as it
    will not be able to locate the php.ini file.


    JW


    Comment

    • lawrence k

      #3
      Re: strange POST vs GET behaviour


      flits@flats.nl wrote:
      The above script doesn't pass the POST. But when I change it to GET it
      does get passed to 2.php. Does anyone have an idea?
      >
      I am using:
      >
      Debian 3.1r4
      Apache v1.3.33
      PHP v4.3.10-18
      Check php.ini for anything to do with POST.

      Comment

      Working...