problems with POST

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • moriman

    #16
    Re: problems with POST

    "Wolfgang Forstmeier" <wolfgang.forst meier@gmx.de> wrote in message
    news:dmfqss$qc4 $02$1@news.t-online.com...[color=blue]
    >
    >
    > moriman wrote:[color=green]
    > > "Wolfgang Forstmeier" <wolfgang.forst meier@gmx.de> wrote in message
    > > news:dmejl5$ps3 $1@news.mch.sbs .de...
    > >[color=darkred]
    > >>
    > >>moriman wrote:
    > >>
    > >>>"Juliette" <jrf_no_spam@jo keaday.net> wrote in message
    > >>>news:438a9e1 c$0$64688$dbd45 001@news.wanado o.nl...
    > >>>
    > >>>>moriman wrote:
    > >>>>
    > >>>>>wow, thx for the *very* quick reply ;-)
    > >>>>>
    > >>>>>tried changing the
    > >>>>>echo "\$p = $p<br><br>";
    > >>>>>
    > >>>>>to
    > >>>>>
    > >>>>>echo "\$p = " . $_POST['p'] . "<br><br>";
    > >>>>>
    > >>>>>but still not working :(
    > >>>>>
    > >>>>>mori
    > >>>>>
    > >>>>>"Gordon Burditt" <gordonb.ari4j@ burditt.org> wrote in message
    > >>>>>news:11ok7 r8qgjmg89a@corp .supernews.com. ..
    > >>>>>
    > >>>>>
    > >>>>>>>The script below *used* to work. I have only just set up a
    > >>>>>>>server , PHP etc again on my Win98 system and now it doesn't?
    > >>>>>>
    > >>>>>>A variable passed from HTML by the POST method is $_POST['r'] or
    > >>>>>>$_POST['p'], *not* $r or $p. (Also see $_GET for variables
    > >>>>>>passed by the GET method). Fix your script. Do not turn
    > >>>>>>on "register_globa ls".
    > >>>>>>
    > >>>>>>Gordon L. Burditt
    > >>>>>>
    > >>>>>>
    > >>>>>>
    > >>>>>>
    > >>>>>>>On first loading this page, you would have
    > >>>>>>>
    > >>>>>>>$p =
    > >>>>>>>
    > >>>>>>>and the button image below it.
    > >>>>>>>On clicking the button the same page would reload but pass the[/color]
    > >
    > > hidden
    > >[color=darkred]
    > >>>>>values
    > >>>>>
    > >>>>>
    > >>>>>>>(r=w & p=f)
    > >>>>>>>so that the first line of the page would then have
    > >>>>>>>
    > >>>>>>>$p = f
    > >>>>>>>
    > >>>>>>>This no longer works???
    > >>>>>>>
    > >>>>>>><?php
    > >>>>>>>echo "<html><bod y>";
    > >>>>>>>echo "\$p = $p<br><br>"; //###
    > >>>>>>>$str = <<<HTM
    > >>>>>>><head>
    > >>>>>>></head>
    > >>>>>>><body>
    > >>>>>>><form action="" method="post">
    > >>>>>>><input type="hidden" name="r" value="w">
    > >>>>>>><input type="hidden" name="p" value="f">
    > >>>>>>><input type="image" src="http://home/images/faq-up.gif" border="0"
    > >>>>>>>height=" 22" width="77">
    > >>>>>>></form>
    > >>>>>>></body>
    > >>>>>>></html>
    > >>>>>>>HTM;
    > >>>>>>>echo $str;
    > >>>>>>>?>
    > >>>>>>>
    > >>>>>>>
    > >>>>>>>on printing the $_ENV variables along with the the above script I[/color]
    > >
    > > find
    > >[color=darkred]
    > >>>>>the
    > >>>>>
    > >>>>>
    > >>>>>>>followin g :
    > >>>>>>>
    > >>>>>>>QUERY_ME THOD POST
    > >>>>>>>REQUEST_ METHOD POST
    > >>>>>>>FORM_P f
    > >>>>>>>FORM_R w
    > >>>>>>>
    > >>>>>>>Is there something I haven't enabled in my
    > >>>>>>>setup of PHP that is stopping this from working now?
    > >>>>>>>
    > >>>>>>>Or has something changed with PHP, so that I have to do this[/color][/color][/color]
    another[color=blue][color=green][color=darkred]
    > >>>
    > >>>way?
    > >>>
    > >>>>>>>many thanks
    > >>>>>>>
    > >>>>>>>mori
    > >>>>>>>
    > >>>>>>>
    > >>>>>>>
    > >>>>>>
    > >>>>Try:
    > >>>>
    > >>>>echo "\$p = " . $HTTP_POST_VARS['p'] . "<br><br>";
    > >>>
    > >>>nope, doesn't work either :(
    > >>>
    > >>>
    > >>
    > >>This will work, you have to set up an submit button
    > >>(javascript or nativ html to send your form data)
    > >>
    > >>If you would like to have an image you should prefer JavaScript.
    > >>If a simple HTML - Button is enougth try the simple Submit Button like
    > >>in my example.
    > >>Have Fun...
    > >>
    > >><?php
    > >>echo "<html>";
    > >>echo "\$p = ".$_POST['p']."<br><br>"; //###
    > >>$str = <<<HTM
    > >><head>
    > >></head>
    > >><body>
    > >><form action="" method="post">
    > >> <input type="hidden" name="r" value="w">
    > >> <input type="hidden" name="p" value="f">
    > >> <input type="submit">
    > >></form>
    > >></body>
    > >></html>
    > >>HTM;
    > >>echo $str;
    > >>?>[/color]
    > >
    > >
    > > Did you try this wolfgang? I did and it doesn't work for me?
    > >
    > >[/color]
    > for me this has worked perfekt ..[/color]

    This is where I think the problem lies, in that there may be something in
    php.ini (or elsewhere) which isn't enabled that is preventing this working
    for me.

    Just can't figure out what or where :(

    thx


    Comment

    • Jerry Stuckle

      #17
      Re: problems with POST

      vdP wrote:[color=blue]
      > Jerry Stuckle wrote:
      >[color=green]
      >> moriman wrote:
      >>[color=darkred]
      >>> <form action="" method="post">
      >>> <input type="hidden" name="r" value="w">
      >>> <input type="hidden" name="p" value="f">
      >>> <input type="image" src="http://home/images/faq-up.gif" border="0"
      >>> height="22" width="77">
      >>> </form>
      >>>[/color]
      >> How are you submitting your form? I don't see a submit button, for
      >> instance.
      >>[/color]
      > I thought the same till I looked up the HTML-specification at
      > http://www.w3.org/TR/REC-html40/inte...ms.html#h-17.4
      > Apparently the input of image type serves as a submit button.
      >
      > vdP[/color]

      Ah, you're right. I seldom use images for submit buttons - just my
      programming style (and the fact I'm a lousy artist!).

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • Jerry Stuckle

        #18
        Re: problems with POST

        moriman wrote:[color=blue]
        > "Hilarion" <hilarion@SPAM. op.SMIECI.pl> wrote in message
        > news:dmfjob$v07 $1@news.onet.pl ...
        >[color=green][color=darkred]
        >>><?php
        >>>echo "<html><bod y>";
        >>>echo "\$p = $p<br><br>"; //###[/color]
        >>
        >>Use $_POST or $HTTP_POST_VARS as others have suggested ($_POST
        >>is preferred, $HTTP_POST_VARS only if $_POST does not work, which
        >>means that you have OLD version of PHP).
        >>
        >>[color=darkred]
        >>>$str = <<<HTM
        >>><head>
        >>></head>
        >>><body>
        >>><form action="" method="post">[/color]
        >>
        >>Give some value to the "action" attribute. Using empty "action"
        >>works differently in different browser. Your browser probably
        >>does not send the data in this case.
        >>[/color]
        >
        >
        > action="" posts the data to the file\page that is loaded.
        > As you will also see from the OP, the data *is* being sent
        >
        >[color=green][color=darkred]
        >>>on printing the $_ENV variables along with the the above script I find[/color][/color]
        >
        > the
        >[color=green][color=darkred]
        >>>following :
        >>>
        >>>QUERY_METH OD POST
        >>>REQUEST_METH OD POST
        >>>FORM_P f
        >>>FORM_R w[/color][/color]
        >
        >
        > the FORM_P f and FORM_R w are the data that have been received. Only I can't
        > seem to 'get hold' of them.
        >
        >[color=green][color=darkred]
        >>> <input type="hidden" name="r" value="w">
        >>> <input type="hidden" name="p" value="f">
        >>> <input type="image" src="http://home/images/faq-up.gif" border="0"
        >>>height="22 " width="77">
        >>></form>
        >>></body>
        >>></html>
        >>>HTM;
        >>>echo $str;[/color]
        >>
        >>Why are you building HTML this way just to echo it?
        >>
        >>[color=darkred]
        >>>?>
        >>>
        >>>
        >>>on printing the $_ENV variables along with the the above script I find[/color][/color]
        >
        > the
        >[color=green][color=darkred]
        >>>following :
        >>>
        >>>QUERY_METH OD POST
        >>>REQUEST_METH OD POST
        >>>FORM_P f
        >>>FORM_R w
        >>>
        >>>Is there something I haven't enabled in my
        >>>setup of PHP that is stopping this from working now?
        >>>
        >>>Or has something changed with PHP, so that I have to do this another[/color][/color]
        >
        > way?
        >[color=green]
        >>Try this:
        >>
        >><html>
        >><head>
        >></head>
        >><body>
        >><pre>
        >>$_POST <?php print_r( $_POST ); ?>
        >>$HTTP_POST_VA RS <?php print_r( $HTTP_POST_VARS ); ?>
        >></pre>
        >><form action="<?php echo htmlspecialchar s( $_SERVER['PHP_SELF'] ); ?>"[/color]
        >
        > method="post">
        >[color=green]
        >> <input type="hidden" name="r" value="w" />
        >> <input type="hidden" name="p" value="f" />
        >> <input type="image" src="http://home/images/faq-up.gif" border="0"
        >> height="22" width="77" />
        >></form>
        >></body>
        >></html>
        >>
        >>
        >>And check HTML source which gets generated before and after submiting
        >>the form. If it still does not work (does not output the posted values),
        >>then send what you got to this thread.
        >>
        >>[/color]
        >
        > There is some problem with your above action as it sends the post to
        >
        > http://home/public_html/test.php
        > not
        > http://home/test.php
        >
        > the absolute path to the script is C:/XITAMI-25/APP/public_html/test.php
        > where C:/XITAMI-25/APP/public_html/ is analogous to my server's http://home
        >
        > I have also added the following to my script
        >
        > foreach ($_POST as $key => $value) {echo "{$key}={$value }<br>";}
        >
        > and this doesn't print anything. Very strange. How can I get
        >
        > FORM_P f
        > FORM_R w
        >
        > yet $_POST appears to be empty¿
        >
        > The further I go, the less I know
        >
        >
        >[color=green]
        >>Hilarion[/color]
        >
        >
        >
        >[/color]

        What happens if your

        print_r($_POST) ;

        Also try it with $_GET and $_REQUEST.


        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • moriman

          #19
          Re: problems with POST


          "Jerry Stuckle" <jstucklex@attg lobal.net> wrote in message
          news:f-GdndK1_oNx7Bben Z2dnUVZ_vudnZ2d @comcast.com...[color=blue]
          > moriman wrote:[color=green]
          > > "Hilarion" <hilarion@SPAM. op.SMIECI.pl> wrote in message
          > > news:dmfjob$v07 $1@news.onet.pl ...
          > >[color=darkred]
          > >>><?php
          > >>>echo "<html><bod y>";
          > >>>echo "\$p = $p<br><br>"; //###
          > >>
          > >>Use $_POST or $HTTP_POST_VARS as others have suggested ($_POST
          > >>is preferred, $HTTP_POST_VARS only if $_POST does not work, which
          > >>means that you have OLD version of PHP).
          > >>
          > >>
          > >>>$str = <<<HTM
          > >>><head>
          > >>></head>
          > >>><body>
          > >>><form action="" method="post">
          > >>
          > >>Give some value to the "action" attribute. Using empty "action"
          > >>works differently in different browser. Your browser probably
          > >>does not send the data in this case.
          > >>[/color]
          > >
          > >
          > > action="" posts the data to the file\page that is loaded.
          > > As you will also see from the OP, the data *is* being sent
          > >
          > >[color=darkred]
          > >>>on printing the $_ENV variables along with the the above script I find[/color]
          > >
          > > the
          > >[color=darkred]
          > >>>following :
          > >>>
          > >>>QUERY_METH OD POST
          > >>>REQUEST_METH OD POST
          > >>>FORM_P f
          > >>>FORM_R w[/color]
          > >
          > >
          > > the FORM_P f and FORM_R w are the data that have been received. Only I[/color][/color]
          can't[color=blue][color=green]
          > > seem to 'get hold' of them.
          > >
          > >[color=darkred]
          > >>> <input type="hidden" name="r" value="w">
          > >>> <input type="hidden" name="p" value="f">
          > >>> <input type="image" src="http://home/images/faq-up.gif" border="0"
          > >>>height="22 " width="77">
          > >>></form>
          > >>></body>
          > >>></html>
          > >>>HTM;
          > >>>echo $str;
          > >>
          > >>Why are you building HTML this way just to echo it?
          > >>
          > >>
          > >>>?>
          > >>>
          > >>>
          > >>>on printing the $_ENV variables along with the the above script I find[/color]
          > >
          > > the
          > >[color=darkred]
          > >>>following :
          > >>>
          > >>>QUERY_METH OD POST
          > >>>REQUEST_METH OD POST
          > >>>FORM_P f
          > >>>FORM_R w
          > >>>
          > >>>Is there something I haven't enabled in my
          > >>>setup of PHP that is stopping this from working now?
          > >>>
          > >>>Or has something changed with PHP, so that I have to do this another[/color]
          > >
          > > way?
          > >[color=darkred]
          > >>Try this:
          > >>
          > >><html>
          > >><head>
          > >></head>
          > >><body>
          > >><pre>
          > >>$_POST <?php print_r( $_POST ); ?>
          > >>$HTTP_POST_VA RS <?php print_r( $HTTP_POST_VARS ); ?>
          > >></pre>
          > >><form action="<?php echo htmlspecialchar s( $_SERVER['PHP_SELF'] ); ?>"[/color]
          > >
          > > method="post">
          > >[color=darkred]
          > >> <input type="hidden" name="r" value="w" />
          > >> <input type="hidden" name="p" value="f" />
          > >> <input type="image" src="http://home/images/faq-up.gif" border="0"
          > >> height="22" width="77" />
          > >></form>
          > >></body>
          > >></html>
          > >>
          > >>
          > >>And check HTML source which gets generated before and after submiting
          > >>the form. If it still does not work (does not output the posted values),
          > >>then send what you got to this thread.
          > >>
          > >>[/color]
          > >
          > > There is some problem with your above action as it sends the post to
          > >
          > > http://home/public_html/test.php
          > > not
          > > http://home/test.php
          > >
          > > the absolute path to the script is C:/XITAMI-25/APP/public_html/test.php
          > > where C:/XITAMI-25/APP/public_html/ is analogous to my server's[/color][/color]
          http://home[color=blue][color=green]
          > >
          > > I have also added the following to my script
          > >
          > > foreach ($_POST as $key => $value) {echo "{$key}={$value }<br>";}
          > >
          > > and this doesn't print anything. Very strange. How can I get
          > >
          > > FORM_P f
          > > FORM_R w
          > >
          > > yet $_POST appears to be empty¿
          > >
          > > The further I go, the less I know
          > >
          > >
          > >[color=darkred]
          > >>Hilarion[/color]
          > >
          > >
          > >
          > >[/color]
          >
          > What happens if your
          >
          > print_r($_POST) ;
          >
          > Also try it with $_GET and $_REQUEST.
          >[/color]

          all 3 arrays are empty

          post <?php print_r($_POST) ; ?><br>
          get <?php print_r($_GET); ?><br>
          request <?php print_r($_REQUE ST); ?><br>

          gives

          post Array ( )
          get Array ( )
          request Array ( )

          [color=blue]
          >
          > --
          > =============== ===
          > Remove the "x" from my email address
          > Jerry Stuckle
          > JDS Computer Training Corp.
          > jstucklex@attgl obal.net
          > =============== ===[/color]





          Comment

          • moriman

            #20
            Re: problems with POST


            "moriman" <moriman@btinte rnet.com> wrote in message
            news:dmfrb9$520 $1@nwrdmz01.dmz .ncs.ea.ibs-infra.bt.com...[color=blue]
            > "Wolfgang Forstmeier" <wolfgang.forst meier@gmx.de> wrote in message
            > news:dmfqss$qc4 $02$1@news.t-online.com...[color=green]
            > >
            > >
            > > moriman wrote:[color=darkred]
            > > > "Wolfgang Forstmeier" <wolfgang.forst meier@gmx.de> wrote in message
            > > > news:dmejl5$ps3 $1@news.mch.sbs .de...
            > > >
            > > >>
            > > >>moriman wrote:
            > > >>
            > > >>>"Juliette" <jrf_no_spam@jo keaday.net> wrote in message
            > > >>>news:438a9e1 c$0$64688$dbd45 001@news.wanado o.nl...
            > > >>>
            > > >>>>moriman wrote:
            > > >>>>
            > > >>>>>wow, thx for the *very* quick reply ;-)
            > > >>>>>
            > > >>>>>tried changing the
            > > >>>>>echo "\$p = $p<br><br>";
            > > >>>>>
            > > >>>>>to
            > > >>>>>
            > > >>>>>echo "\$p = " . $_POST['p'] . "<br><br>";
            > > >>>>>
            > > >>>>>but still not working :(
            > > >>>>>
            > > >>>>>mori
            > > >>>>>
            > > >>>>>"Gordon Burditt" <gordonb.ari4j@ burditt.org> wrote in message
            > > >>>>>news:11ok7 r8qgjmg89a@corp .supernews.com. ..
            > > >>>>>
            > > >>>>>
            > > >>>>>>>The script below *used* to work. I have only just set up a
            > > >>>>>>>server , PHP etc again on my Win98 system and now it doesn't?
            > > >>>>>>
            > > >>>>>>A variable passed from HTML by the POST method is $_POST['r'] or
            > > >>>>>>$_POST['p'], *not* $r or $p. (Also see $_GET for variables
            > > >>>>>>passed by the GET method). Fix your script. Do not turn
            > > >>>>>>on "register_globa ls".
            > > >>>>>>
            > > >>>>>>Gordon L. Burditt
            > > >>>>>>
            > > >>>>>>
            > > >>>>>>
            > > >>>>>>
            > > >>>>>>>On first loading this page, you would have
            > > >>>>>>>
            > > >>>>>>>$p =
            > > >>>>>>>
            > > >>>>>>>and the button image below it.
            > > >>>>>>>On clicking the button the same page would reload but pass the
            > > >
            > > > hidden
            > > >
            > > >>>>>values
            > > >>>>>
            > > >>>>>
            > > >>>>>>>(r=w & p=f)
            > > >>>>>>>so that the first line of the page would then have
            > > >>>>>>>
            > > >>>>>>>$p = f
            > > >>>>>>>
            > > >>>>>>>This no longer works???
            > > >>>>>>>
            > > >>>>>>><?php
            > > >>>>>>>echo "<html><bod y>";
            > > >>>>>>>echo "\$p = $p<br><br>"; //###
            > > >>>>>>>$str = <<<HTM
            > > >>>>>>><head>
            > > >>>>>>></head>
            > > >>>>>>><body>
            > > >>>>>>><form action="" method="post">
            > > >>>>>>><input type="hidden" name="r" value="w">
            > > >>>>>>><input type="hidden" name="p" value="f">
            > > >>>>>>><input type="image" src="http://home/images/faq-up.gif"[/color][/color][/color]
            border="0"[color=blue][color=green][color=darkred]
            > > >>>>>>>height=" 22" width="77">
            > > >>>>>>></form>
            > > >>>>>>></body>
            > > >>>>>>></html>
            > > >>>>>>>HTM;
            > > >>>>>>>echo $str;
            > > >>>>>>>?>
            > > >>>>>>>
            > > >>>>>>>
            > > >>>>>>>on printing the $_ENV variables along with the the above script I
            > > >
            > > > find
            > > >
            > > >>>>>the
            > > >>>>>
            > > >>>>>
            > > >>>>>>>followin g :
            > > >>>>>>>
            > > >>>>>>>QUERY_ME THOD POST
            > > >>>>>>>REQUEST_ METHOD POST
            > > >>>>>>>FORM_P f
            > > >>>>>>>FORM_R w
            > > >>>>>>>
            > > >>>>>>>Is there something I haven't enabled in my
            > > >>>>>>>setup of PHP that is stopping this from working now?
            > > >>>>>>>
            > > >>>>>>>Or has something changed with PHP, so that I have to do this[/color][/color]
            > another[color=green][color=darkred]
            > > >>>
            > > >>>way?
            > > >>>
            > > >>>>>>>many thanks
            > > >>>>>>>
            > > >>>>>>>mori
            > > >>>>>>>
            > > >>>>>>>
            > > >>>>>>>
            > > >>>>>>
            > > >>>>Try:
            > > >>>>
            > > >>>>echo "\$p = " . $HTTP_POST_VARS['p'] . "<br><br>";
            > > >>>
            > > >>>nope, doesn't work either :(
            > > >>>
            > > >>>
            > > >>
            > > >>This will work, you have to set up an submit button
            > > >>(javascript or nativ html to send your form data)
            > > >>
            > > >>If you would like to have an image you should prefer JavaScript.
            > > >>If a simple HTML - Button is enougth try the simple Submit Button like
            > > >>in my example.
            > > >>Have Fun...
            > > >>
            > > >><?php
            > > >>echo "<html>";
            > > >>echo "\$p = ".$_POST['p']."<br><br>"; //###
            > > >>$str = <<<HTM
            > > >><head>
            > > >></head>
            > > >><body>
            > > >><form action="" method="post">
            > > >> <input type="hidden" name="r" value="w">
            > > >> <input type="hidden" name="p" value="f">
            > > >> <input type="submit">
            > > >></form>
            > > >></body>
            > > >></html>
            > > >>HTM;
            > > >>echo $str;
            > > >>?>
            > > >
            > > >
            > > > Did you try this wolfgang? I did and it doesn't work for me?
            > > >
            > > >[/color]
            > > for me this has worked perfekt ..[/color]
            >
            > This is where I think the problem lies, in that there may be something in
            > php.ini (or elsewhere) which isn't enabled that is preventing this working
            > for me.
            >
            > Just can't figure out what or where :(
            >[/color]

            Ah!, finally found the prob, duh!
            My Xitami server has an option to pass form fields with a prefix. The prefix
            was set to 'FORM_'.
            Removing this prefix allows my scripts to work again, phew!

            Thanks for your input ;-)



            [color=blue]
            > thx
            >
            >[/color]


            Comment

            • moriman

              #21
              Re: problems with POST


              "moriman" <moriman@btinte rnet.com> wrote in message
              news:dmfsde$3hm $1@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...[color=blue]
              >
              > "Jerry Stuckle" <jstucklex@attg lobal.net> wrote in message
              > news:f-GdndK1_oNx7Bben Z2dnUVZ_vudnZ2d @comcast.com...[color=green]
              > > moriman wrote:[color=darkred]
              > > > "Hilarion" <hilarion@SPAM. op.SMIECI.pl> wrote in message
              > > > news:dmfjob$v07 $1@news.onet.pl ...
              > > >
              > > >>><?php
              > > >>>echo "<html><bod y>";
              > > >>>echo "\$p = $p<br><br>"; //###
              > > >>
              > > >>Use $_POST or $HTTP_POST_VARS as others have suggested ($_POST
              > > >>is preferred, $HTTP_POST_VARS only if $_POST does not work, which
              > > >>means that you have OLD version of PHP).
              > > >>
              > > >>
              > > >>>$str = <<<HTM
              > > >>><head>
              > > >>></head>
              > > >>><body>
              > > >>><form action="" method="post">
              > > >>
              > > >>Give some value to the "action" attribute. Using empty "action"
              > > >>works differently in different browser. Your browser probably
              > > >>does not send the data in this case.
              > > >>
              > > >
              > > >
              > > > action="" posts the data to the file\page that is loaded.
              > > > As you will also see from the OP, the data *is* being sent
              > > >
              > > >
              > > >>>on printing the $_ENV variables along with the the above script I[/color][/color][/color]
              find[color=blue][color=green][color=darkred]
              > > >
              > > > the
              > > >
              > > >>>following :
              > > >>>
              > > >>>QUERY_METH OD POST
              > > >>>REQUEST_METH OD POST
              > > >>>FORM_P f
              > > >>>FORM_R w
              > > >
              > > >
              > > > the FORM_P f and FORM_R w are the data that have been received. Only I[/color][/color]
              > can't[color=green][color=darkred]
              > > > seem to 'get hold' of them.
              > > >
              > > >
              > > >>> <input type="hidden" name="r" value="w">
              > > >>> <input type="hidden" name="p" value="f">
              > > >>> <input type="image" src="http://home/images/faq-up.gif" border="0"
              > > >>>height="22 " width="77">
              > > >>></form>
              > > >>></body>
              > > >>></html>
              > > >>>HTM;
              > > >>>echo $str;
              > > >>
              > > >>Why are you building HTML this way just to echo it?
              > > >>
              > > >>
              > > >>>?>
              > > >>>
              > > >>>
              > > >>>on printing the $_ENV variables along with the the above script I[/color][/color][/color]
              find[color=blue][color=green][color=darkred]
              > > >
              > > > the
              > > >
              > > >>>following :
              > > >>>
              > > >>>QUERY_METH OD POST
              > > >>>REQUEST_METH OD POST
              > > >>>FORM_P f
              > > >>>FORM_R w
              > > >>>
              > > >>>Is there something I haven't enabled in my
              > > >>>setup of PHP that is stopping this from working now?
              > > >>>
              > > >>>Or has something changed with PHP, so that I have to do this another
              > > >
              > > > way?
              > > >
              > > >>Try this:
              > > >>
              > > >><html>
              > > >><head>
              > > >></head>
              > > >><body>
              > > >><pre>
              > > >>$_POST <?php print_r( $_POST ); ?>
              > > >>$HTTP_POST_VA RS <?php print_r( $HTTP_POST_VARS ); ?>
              > > >></pre>
              > > >><form action="<?php echo htmlspecialchar s( $_SERVER['PHP_SELF'] ); ?>"
              > > >
              > > > method="post">
              > > >
              > > >> <input type="hidden" name="r" value="w" />
              > > >> <input type="hidden" name="p" value="f" />
              > > >> <input type="image" src="http://home/images/faq-up.gif" border="0"
              > > >> height="22" width="77" />
              > > >></form>
              > > >></body>
              > > >></html>
              > > >>
              > > >>
              > > >>And check HTML source which gets generated before and after submiting
              > > >>the form. If it still does not work (does not output the posted[/color][/color][/color]
              values),[color=blue][color=green][color=darkred]
              > > >>then send what you got to this thread.
              > > >>
              > > >>
              > > >
              > > > There is some problem with your above action as it sends the post to
              > > >
              > > > http://home/public_html/test.php
              > > > not
              > > > http://home/test.php
              > > >
              > > > the absolute path to the script is[/color][/color][/color]
              C:/XITAMI-25/APP/public_html/test.php[color=blue][color=green][color=darkred]
              > > > where C:/XITAMI-25/APP/public_html/ is analogous to my server's[/color][/color]
              > http://home[color=green][color=darkred]
              > > >
              > > > I have also added the following to my script
              > > >
              > > > foreach ($_POST as $key => $value) {echo "{$key}={$value }<br>";}
              > > >
              > > > and this doesn't print anything. Very strange. How can I get
              > > >
              > > > FORM_P f
              > > > FORM_R w
              > > >
              > > > yet $_POST appears to be empty¿
              > > >
              > > > The further I go, the less I know
              > > >
              > > >
              > > >
              > > >>Hilarion
              > > >
              > > >
              > > >
              > > >[/color]
              > >
              > > What happens if your
              > >
              > > print_r($_POST) ;
              > >
              > > Also try it with $_GET and $_REQUEST.
              > >[/color]
              >
              > all 3 arrays are empty
              >
              > post <?php print_r($_POST) ; ?><br>
              > get <?php print_r($_GET); ?><br>
              > request <?php print_r($_REQUE ST); ?><br>
              >
              > gives
              >
              > post Array ( )
              > get Array ( )
              > request Array ( )
              >
              >[/color]

              Ah!, finally found the prob, duh!
              My Xitami server has an option to pass form fields with a prefix. The prefix
              was set to 'FORM_'.
              Removing this prefix allows my scripts to work again, phew!

              Thanks for your input ;-)

              [color=blue][color=green]
              > >
              > > --
              > > =============== ===
              > > Remove the "x" from my email address
              > > Jerry Stuckle
              > > JDS Computer Training Corp.
              > > jstucklex@attgl obal.net
              > > =============== ===[/color]
              >
              >
              >
              >
              >[/color]


              Comment

              • Hilarion

                #22
                Re: problems with POST

                > [snip][color=blue][color=green][color=darkred]
                >>> <form action="" method="post">[/color]
                >>
                >> Give some value to the "action" attribute. Using empty "action"
                >> works differently in different browser. Your browser probably
                >> does not send the data in this case.
                >>[/color]
                >
                > action="" posts the data to the file\page that is loaded.[/color]

                In some browsers - yes. Read HTML specification. Value of
                "action" attribute in "form" tag is REQUIRED.

                Look here:
                http://www.w3.org/TR/REC-html40/inte...ms.html#h-17.3

                quote:
                "This attribute specifies a form processing agent. User agent
                behavior for a value other than an HTTP URI is undefined."

                Empty value is not a HTTP URI.

                [color=blue]
                > As you will also see from the OP, the data *is* being sent[/color]

                As I wrote - some browsers may behave like this. Yours apparently
                does behave like this (which means that the wrong value of
                "action" attribute is not the cause of the problem). This does NOT
                mean that all browser will, so if you want your form to be
                submitable in some other browsers too, then you should specify
                valid value.

                [color=blue]
                > [snip][color=green]
                >> <form action="<?php echo htmlspecialchar s( $_SERVER['PHP_SELF'] ); ?>"
                >> method="post">[/color][/color]
                [color=blue]
                > [snip]
                >
                > There is some problem with your above action as it sends the post to
                >
                > http://home/public_html/test.php
                > not
                > http://home/test.php
                >
                > the absolute path to the script is C:/XITAMI-25/APP/public_html/test.php
                > where C:/XITAMI-25/APP/public_html/ is analogous to my server's http://home[/color]

                Which means that your server configuration is somehow screwed.
                $_SERVER['PHP_SELF'] should point to the URL of the script which
                was originally called. Maybe some value in your php.ini suggests that
                "http://home/public_html/" is your DOCUMENT_ROOT (or something like
                that, I'm not sure).


                Hilarion

                Comment

                • Marty Meyers

                  #23
                  Re: problems with POST

                  Hi all,
                  I have followed this thread with interest as I have almost the exact same
                  problem. ( I am new to PHP and have inherited a project with 100's of files
                  like this which I am moving to a new server). I also posted a similar
                  question which Irwin Moller answered and gave me some good tips to work
                  with. I have two differences from moriman's problem:
                  1) I don't see ANY entries when I dump the environment variables.
                  2) If I leave the form Method="POST", but return the variables I want as
                  "GET" args after the "?" then $_GET('name') works.

                  BTW-Moriman, Would you please post the specific's of the setting you found
                  in the Xtami server? I'm on Apache but there might be something similar
                  that I haven't found yet.

                  What I really don't understand is why GET will work but POST doesn't.
                  TIA for any suggestions on what to look for.
                  Marty


                  "moriman" <moriman@btinte rnet.com> wrote in message
                  news:dmftoe$n0m $1@nwrdmz02.dmz .ncs.ea.ibs-infra.bt.com...[color=blue]
                  >
                  > "moriman" <moriman@btinte rnet.com> wrote in message
                  > news:dmfsde$3hm $1@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...[color=green]
                  > >
                  > > "Jerry Stuckle" <jstucklex@attg lobal.net> wrote in message
                  > > news:f-GdndK1_oNx7Bben Z2dnUVZ_vudnZ2d @comcast.com...[color=darkred]
                  > > > moriman wrote:
                  > > > > "Hilarion" <hilarion@SPAM. op.SMIECI.pl> wrote in message
                  > > > > news:dmfjob$v07 $1@news.onet.pl ...
                  > > > >
                  > > > >>><?php
                  > > > >>>echo "<html><bod y>";
                  > > > >>>echo "\$p = $p<br><br>"; //###
                  > > > >>
                  > > > >>Use $_POST or $HTTP_POST_VARS as others have suggested ($_POST
                  > > > >>is preferred, $HTTP_POST_VARS only if $_POST does not work, which
                  > > > >>means that you have OLD version of PHP).
                  > > > >>
                  > > > >>
                  > > > >>>$str = <<<HTM
                  > > > >>><head>
                  > > > >>></head>
                  > > > >>><body>
                  > > > >>><form action="" method="post">
                  > > > >>
                  > > > >>Give some value to the "action" attribute. Using empty "action"
                  > > > >>works differently in different browser. Your browser probably
                  > > > >>does not send the data in this case.
                  > > > >>
                  > > > >
                  > > > >
                  > > > > action="" posts the data to the file\page that is loaded.
                  > > > > As you will also see from the OP, the data *is* being sent
                  > > > >
                  > > > >
                  > > > >>>on printing the $_ENV variables along with the the above script I[/color][/color]
                  > find[color=green][color=darkred]
                  > > > >
                  > > > > the
                  > > > >
                  > > > >>>following :
                  > > > >>>
                  > > > >>>QUERY_METH OD POST
                  > > > >>>REQUEST_METH OD POST
                  > > > >>>FORM_P f
                  > > > >>>FORM_R w
                  > > > >
                  > > > >
                  > > > > the FORM_P f and FORM_R w are the data that have been received. Only[/color][/color][/color]
                  I[color=blue][color=green]
                  > > can't[color=darkred]
                  > > > > seem to 'get hold' of them.
                  > > > >
                  > > > >
                  > > > >>> <input type="hidden" name="r" value="w">
                  > > > >>> <input type="hidden" name="p" value="f">
                  > > > >>> <input type="image" src="http://home/images/faq-up.gif" border="0"
                  > > > >>>height="22 " width="77">
                  > > > >>></form>
                  > > > >>></body>
                  > > > >>></html>
                  > > > >>>HTM;
                  > > > >>>echo $str;
                  > > > >>
                  > > > >>Why are you building HTML this way just to echo it?
                  > > > >>
                  > > > >>
                  > > > >>>?>
                  > > > >>>
                  > > > >>>
                  > > > >>>on printing the $_ENV variables along with the the above script I[/color][/color]
                  > find[color=green][color=darkred]
                  > > > >
                  > > > > the
                  > > > >
                  > > > >>>following :
                  > > > >>>
                  > > > >>>QUERY_METH OD POST
                  > > > >>>REQUEST_METH OD POST
                  > > > >>>FORM_P f
                  > > > >>>FORM_R w
                  > > > >>>
                  > > > >>>Is there something I haven't enabled in my
                  > > > >>>setup of PHP that is stopping this from working now?
                  > > > >>>
                  > > > >>>Or has something changed with PHP, so that I have to do this[/color][/color][/color]
                  another[color=blue][color=green][color=darkred]
                  > > > >
                  > > > > way?
                  > > > >
                  > > > >>Try this:
                  > > > >>
                  > > > >><html>
                  > > > >><head>
                  > > > >></head>
                  > > > >><body>
                  > > > >><pre>
                  > > > >>$_POST <?php print_r( $_POST ); ?>
                  > > > >>$HTTP_POST_VA RS <?php print_r( $HTTP_POST_VARS ); ?>
                  > > > >></pre>
                  > > > >><form action="<?php echo htmlspecialchar s( $_SERVER['PHP_SELF'] );[/color][/color][/color]
                  ?>"[color=blue][color=green][color=darkred]
                  > > > >
                  > > > > method="post">
                  > > > >
                  > > > >> <input type="hidden" name="r" value="w" />
                  > > > >> <input type="hidden" name="p" value="f" />
                  > > > >> <input type="image" src="http://home/images/faq-up.gif" border="0"
                  > > > >> height="22" width="77" />
                  > > > >></form>
                  > > > >></body>
                  > > > >></html>
                  > > > >>
                  > > > >>
                  > > > >>And check HTML source which gets generated before and after[/color][/color][/color]
                  submiting[color=blue][color=green][color=darkred]
                  > > > >>the form. If it still does not work (does not output the posted[/color][/color]
                  > values),[color=green][color=darkred]
                  > > > >>then send what you got to this thread.
                  > > > >>
                  > > > >>
                  > > > >
                  > > > > There is some problem with your above action as it sends the post to
                  > > > >
                  > > > > http://home/public_html/test.php
                  > > > > not
                  > > > > http://home/test.php
                  > > > >
                  > > > > the absolute path to the script is[/color][/color]
                  > C:/XITAMI-25/APP/public_html/test.php[color=green][color=darkred]
                  > > > > where C:/XITAMI-25/APP/public_html/ is analogous to my server's[/color]
                  > > http://home[color=darkred]
                  > > > >
                  > > > > I have also added the following to my script
                  > > > >
                  > > > > foreach ($_POST as $key => $value) {echo "{$key}={$value }<br>";}
                  > > > >
                  > > > > and this doesn't print anything. Very strange. How can I get
                  > > > >
                  > > > > FORM_P f
                  > > > > FORM_R w
                  > > > >
                  > > > > yet $_POST appears to be empty¿
                  > > > >
                  > > > > The further I go, the less I know
                  > > > >
                  > > > >
                  > > > >
                  > > > >>Hilarion
                  > > > >
                  > > > >
                  > > > >
                  > > > >
                  > > >
                  > > > What happens if your
                  > > >
                  > > > print_r($_POST) ;
                  > > >
                  > > > Also try it with $_GET and $_REQUEST.
                  > > >[/color]
                  > >
                  > > all 3 arrays are empty
                  > >
                  > > post <?php print_r($_POST) ; ?><br>
                  > > get <?php print_r($_GET); ?><br>
                  > > request <?php print_r($_REQUE ST); ?><br>
                  > >
                  > > gives
                  > >
                  > > post Array ( )
                  > > get Array ( )
                  > > request Array ( )
                  > >
                  > >[/color]
                  >
                  > Ah!, finally found the prob, duh!
                  > My Xitami server has an option to pass form fields with a prefix. The[/color]
                  prefix[color=blue]
                  > was set to 'FORM_'.
                  > Removing this prefix allows my scripts to work again, phew!
                  >
                  > Thanks for your input ;-)
                  >
                  >[color=green][color=darkred]
                  > > >
                  > > > --
                  > > > =============== ===
                  > > > Remove the "x" from my email address
                  > > > Jerry Stuckle
                  > > > JDS Computer Training Corp.
                  > > > jstucklex@attgl obal.net
                  > > > =============== ===[/color]
                  > >
                  > >
                  > >
                  > >
                  > >[/color]
                  >
                  >[/color]


                  Comment

                  • Jim Michaels

                    #24
                    Re: problems with POST

                    I don't know if you realize this, but you are using the wrong brackets on
                    the array $_GET['name'].
                    GET is used for URL variables/fields. POST is used for the other
                    "invisible" method of passing form fields. $_REQUEST[] will see form fields
                    from either method if I remember correctly.

                    $HTTP_POST_VARS and $_HTTP_GET_VARS are deprecated (being tossed). I have
                    heard someone post a complaint that it was not working in the latest PHP,
                    but that seems out of style with PHP's thing for compatibility - but it's a
                    warning nonetheless.

                    "Marty Meyers" <martym@execpc. com> wrote in message
                    news:11r5i9hl23 f7s0f@corp.supe rnews.com...[color=blue]
                    > Hi all,
                    > I have followed this thread with interest as I have almost the exact same
                    > problem. ( I am new to PHP and have inherited a project with 100's of
                    > files
                    > like this which I am moving to a new server). I also posted a similar
                    > question which Irwin Moller answered and gave me some good tips to work
                    > with. I have two differences from moriman's problem:
                    > 1) I don't see ANY entries when I dump the environment variables.
                    > 2) If I leave the form Method="POST", but return the variables I want as
                    > "GET" args after the "?" then $_GET('name') works.
                    >
                    > BTW-Moriman, Would you please post the specific's of the setting you found
                    > in the Xtami server? I'm on Apache but there might be something similar
                    > that I haven't found yet.
                    >
                    > What I really don't understand is why GET will work but POST doesn't.
                    > TIA for any suggestions on what to look for.
                    > Marty
                    >
                    >
                    > "moriman" <moriman@btinte rnet.com> wrote in message
                    > news:dmftoe$n0m $1@nwrdmz02.dmz .ncs.ea.ibs-infra.bt.com...[color=green]
                    >>
                    >> "moriman" <moriman@btinte rnet.com> wrote in message
                    >> news:dmfsde$3hm $1@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...[color=darkred]
                    >> >
                    >> > "Jerry Stuckle" <jstucklex@attg lobal.net> wrote in message
                    >> > news:f-GdndK1_oNx7Bben Z2dnUVZ_vudnZ2d @comcast.com...
                    >> > > moriman wrote:
                    >> > > > "Hilarion" <hilarion@SPAM. op.SMIECI.pl> wrote in message
                    >> > > > news:dmfjob$v07 $1@news.onet.pl ...
                    >> > > >
                    >> > > >>><?php
                    >> > > >>>echo "<html><bod y>";
                    >> > > >>>echo "\$p = $p<br><br>"; //###
                    >> > > >>
                    >> > > >>Use $_POST or $HTTP_POST_VARS as others have suggested ($_POST
                    >> > > >>is preferred, $HTTP_POST_VARS only if $_POST does not work, which
                    >> > > >>means that you have OLD version of PHP).
                    >> > > >>
                    >> > > >>
                    >> > > >>>$str = <<<HTM
                    >> > > >>><head>
                    >> > > >>></head>
                    >> > > >>><body>
                    >> > > >>><form action="" method="post">
                    >> > > >>
                    >> > > >>Give some value to the "action" attribute. Using empty "action"
                    >> > > >>works differently in different browser. Your browser probably
                    >> > > >>does not send the data in this case.
                    >> > > >>
                    >> > > >
                    >> > > >
                    >> > > > action="" posts the data to the file\page that is loaded.
                    >> > > > As you will also see from the OP, the data *is* being sent
                    >> > > >
                    >> > > >
                    >> > > >>>on printing the $_ENV variables along with the the above script I[/color]
                    >> find[color=darkred]
                    >> > > >
                    >> > > > the
                    >> > > >
                    >> > > >>>following :
                    >> > > >>>
                    >> > > >>>QUERY_METH OD POST
                    >> > > >>>REQUEST_METH OD POST
                    >> > > >>>FORM_P f
                    >> > > >>>FORM_R w
                    >> > > >
                    >> > > >
                    >> > > > the FORM_P f and FORM_R w are the data that have been received.
                    >> > > > Only[/color][/color]
                    > I[color=green][color=darkred]
                    >> > can't
                    >> > > > seem to 'get hold' of them.
                    >> > > >
                    >> > > >
                    >> > > >>> <input type="hidden" name="r" value="w">
                    >> > > >>> <input type="hidden" name="p" value="f">
                    >> > > >>> <input type="image" src="http://home/images/faq-up.gif"
                    >> > > >>> border="0"
                    >> > > >>>height="22 " width="77">
                    >> > > >>></form>
                    >> > > >>></body>
                    >> > > >>></html>
                    >> > > >>>HTM;
                    >> > > >>>echo $str;
                    >> > > >>
                    >> > > >>Why are you building HTML this way just to echo it?
                    >> > > >>
                    >> > > >>
                    >> > > >>>?>
                    >> > > >>>
                    >> > > >>>
                    >> > > >>>on printing the $_ENV variables along with the the above script I[/color]
                    >> find[color=darkred]
                    >> > > >
                    >> > > > the
                    >> > > >
                    >> > > >>>following :
                    >> > > >>>
                    >> > > >>>QUERY_METH OD POST
                    >> > > >>>REQUEST_METH OD POST
                    >> > > >>>FORM_P f
                    >> > > >>>FORM_R w
                    >> > > >>>
                    >> > > >>>Is there something I haven't enabled in my
                    >> > > >>>setup of PHP that is stopping this from working now?
                    >> > > >>>
                    >> > > >>>Or has something changed with PHP, so that I have to do this[/color][/color]
                    > another[color=green][color=darkred]
                    >> > > >
                    >> > > > way?
                    >> > > >
                    >> > > >>Try this:
                    >> > > >>
                    >> > > >><html>
                    >> > > >><head>
                    >> > > >></head>
                    >> > > >><body>
                    >> > > >><pre>
                    >> > > >>$_POST <?php print_r( $_POST ); ?>
                    >> > > >>$HTTP_POST_VA RS <?php print_r( $HTTP_POST_VARS ); ?>
                    >> > > >></pre>
                    >> > > >><form action="<?php echo htmlspecialchar s( $_SERVER['PHP_SELF'] );[/color][/color]
                    > ?>"[color=green][color=darkred]
                    >> > > >
                    >> > > > method="post">
                    >> > > >
                    >> > > >> <input type="hidden" name="r" value="w" />
                    >> > > >> <input type="hidden" name="p" value="f" />
                    >> > > >> <input type="image" src="http://home/images/faq-up.gif"
                    >> > > >> border="0"
                    >> > > >> height="22" width="77" />
                    >> > > >></form>
                    >> > > >></body>
                    >> > > >></html>
                    >> > > >>
                    >> > > >>
                    >> > > >>And check HTML source which gets generated before and after[/color][/color]
                    > submiting[color=green][color=darkred]
                    >> > > >>the form. If it still does not work (does not output the posted[/color]
                    >> values),[color=darkred]
                    >> > > >>then send what you got to this thread.
                    >> > > >>
                    >> > > >>
                    >> > > >
                    >> > > > There is some problem with your above action as it sends the post
                    >> > > > to
                    >> > > >
                    >> > > > http://home/public_html/test.php
                    >> > > > not
                    >> > > > http://home/test.php
                    >> > > >
                    >> > > > the absolute path to the script is[/color]
                    >> C:/XITAMI-25/APP/public_html/test.php[color=darkred]
                    >> > > > where C:/XITAMI-25/APP/public_html/ is analogous to my server's
                    >> > http://home
                    >> > > >
                    >> > > > I have also added the following to my script
                    >> > > >
                    >> > > > foreach ($_POST as $key => $value) {echo
                    >> > > > "{$key}={$value }<br>";}
                    >> > > >
                    >> > > > and this doesn't print anything. Very strange. How can I get
                    >> > > >
                    >> > > > FORM_P f
                    >> > > > FORM_R w
                    >> > > >
                    >> > > > yet $_POST appears to be empty¿
                    >> > > >
                    >> > > > The further I go, the less I know
                    >> > > >
                    >> > > >
                    >> > > >
                    >> > > >>Hilarion
                    >> > > >
                    >> > > >
                    >> > > >
                    >> > > >
                    >> > >
                    >> > > What happens if your
                    >> > >
                    >> > > print_r($_POST) ;
                    >> > >
                    >> > > Also try it with $_GET and $_REQUEST.
                    >> > >
                    >> >
                    >> > all 3 arrays are empty
                    >> >
                    >> > post <?php print_r($_POST) ; ?><br>
                    >> > get <?php print_r($_GET); ?><br>
                    >> > request <?php print_r($_REQUE ST); ?><br>
                    >> >
                    >> > gives
                    >> >
                    >> > post Array ( )
                    >> > get Array ( )
                    >> > request Array ( )
                    >> >
                    >> >[/color]
                    >>
                    >> Ah!, finally found the prob, duh!
                    >> My Xitami server has an option to pass form fields with a prefix. The[/color]
                    > prefix[color=green]
                    >> was set to 'FORM_'.
                    >> Removing this prefix allows my scripts to work again, phew!
                    >>
                    >> Thanks for your input ;-)
                    >>
                    >>[color=darkred]
                    >> > >
                    >> > > --
                    >> > > =============== ===
                    >> > > Remove the "x" from my email address
                    >> > > Jerry Stuckle
                    >> > > JDS Computer Training Corp.
                    >> > > jstucklex@attgl obal.net
                    >> > > =============== ===
                    >> >
                    >> >
                    >> >
                    >> >
                    >> >[/color]
                    >>
                    >>[/color]
                    >
                    >[/color]


                    Comment

                    • Marty Meyers

                      #25
                      Re: problems with POST


                      "Jim Michaels" <jmichae3@yahoo .com> wrote in message
                      news:XtSdnagH-vGk61beRVn-uQ@comcast.com. ..[color=blue]
                      > I don't know if you realize this, but you are using the wrong brackets on
                      > the array $_GET['name'].
                      > GET is used for URL variables/fields. POST is used for the other
                      > "invisible" method of passing form fields. $_REQUEST[] will see form[/color]
                      fields[color=blue]
                      > from either method if I remember correctly.
                      >
                      > $HTTP_POST_VARS and $_HTTP_GET_VARS are deprecated (being tossed). I have
                      > heard someone post a complaint that it was not working in the latest PHP,
                      > but that seems out of style with PHP's thing for compatibility - but it's[/color]
                      a[color=blue]
                      > warning nonetheless.
                      >
                      > "Marty Meyers" <martym@execpc. com> wrote in message
                      > news:11r5i9hl23 f7s0f@corp.supe rnews.com...[color=green]
                      > > Hi all,
                      > > I have followed this thread with interest as I have almost the exact[/color][/color]
                      same[color=blue][color=green]
                      > > problem. ( I am new to PHP and have inherited a project with 100's of
                      > > files
                      > > like this which I am moving to a new server). I also posted a similar
                      > > question which Irwin Moller answered and gave me some good tips to work
                      > > with. I have two differences from moriman's problem:
                      > > 1) I don't see ANY entries when I dump the environment variables.
                      > > 2) If I leave the form Method="POST", but return the variables I want[/color][/color]
                      as[color=blue][color=green]
                      > > "GET" args after the "?" then $_GET('name') works.
                      > >
                      > > BTW-Moriman, Would you please post the specific's of the setting you[/color][/color]
                      found[color=blue][color=green]
                      > > in the Xtami server? I'm on Apache but there might be something[/color][/color]
                      similar[color=blue][color=green]
                      > > that I haven't found yet.
                      > >
                      > > What I really don't understand is why GET will work but POST doesn't.
                      > > TIA for any suggestions on what to look for.
                      > > Marty
                      > >
                      > >[/color][/color]
                      -----snip------
                      Hi Jim,
                      Yep, a typo on my part with the wrong brackets when I created the email. I
                      use them correctly in the code.

                      The backward compatibility problem is accurate. I had to fix it because I
                      did not want to turn "register_globa ls" in php.ini 'on'.
                      My problem with the POST variables turned out to be a problem with the
                      "siteprevie w" that is being used to test the new server. Someone else was
                      able to find the problem and got it fixed. I don't know the details yet. I
                      don't know what "siteprevie w" is or what it involves.

                      I'm pretty new to web programming
                      Thanks
                      Marty



                      Comment

                      Working...