Post to self?

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

    Post to self?

    if test.php is this file:


    <?php
    $lang = $_POST["lang"];
    print $lang;
    ?>



    <form method=post action=test.php >
    <input type=image src=engFlag.jpg name="lang" value=en>
    <input type=image src=fraFlag.jpg name="lang" value=fr>
    </form>



    Why won't it print $lang; after having one of the images clicked?
  • Andy Hassall

    #2
    Re: Post to self?

    On Sat, 02 Sep 2006 20:07:21 GMT, Jon Pike <anonomoose@spa mless.comwrote:
    >if test.php is this file:
    >
    ><?php
    > $lang = $_POST["lang"];
    > print $lang;
    >?>
    ><form method=post action=test.php >
    ><input type=image src=engFlag.jpg name="lang" value=en>
    ><input type=image src=fraFlag.jpg name="lang" value=fr>
    ></form>
    >
    >Why won't it print $lang; after having one of the images clicked?
    Does here on Firefox.

    But on Internet Explorer it only posts "lang_x" and "lang_y" for the
    coordinates of the click.



    The "." from the standard is transformed by PHP into "_".

    IE's behaviour here is very unhelpful, and probably a violation of the
    standard; it says the x and y are included in the submitted data, but doesn't
    say to eliminate the original name/value pair.

    --
    Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
    http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

    Comment

    • Jon Pike

      #3
      Re: Post to self?

      Andy Hassall <andy@andyh.co. ukwrote in
      news:m5vjf2pdso 3jflg4sefea1cm0 nsm7f8j7b@4ax.c om:
      On Sat, 02 Sep 2006 20:07:21 GMT, Jon Pike <anonomoose@spa mless.com>
      wrote:
      >
      >>if test.php is this file:
      >>
      >><?php
      > $lang = $_POST["lang"];
      > print $lang;
      >>?>
      >><form method=post action=test.php >
      >><input type=image src=engFlag.jpg name="lang" value=en>
      >><input type=image src=fraFlag.jpg name="lang" value=fr>
      >></form>
      >>
      >>Why won't it print $lang; after having one of the images clicked?
      >
      Does here on Firefox.
      >
      But on Internet Explorer it only posts "lang_x" and "lang_y" for the
      coordinates of the click.
      >

      >
      The "." from the standard is transformed by PHP into "_".
      >
      IE's behaviour here is very unhelpful, and probably a violation of
      the
      standard; it says the x and y are included in the submitted data, but
      doesn't say to eliminate the original name/value pair.
      >
      Ah, very clear, thank you!

      Comment

      Working...