what has Hostway done to PHP? Form variables suddenly undefined in previously working forms

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

    #1

    what has Hostway done to PHP? Form variables suddenly undefined in previously working forms

    Hostway swears they didn't do anything but mysterious breakdowns have made
    us do the following test:
    <?
    if ($_POST) {
    echo "<h3>name is defined as $name</h3>";
    print_r($_POST) ;
    exit;
    }
    ?>

    <form name="form1" method="post" action="test.ph p">
    <input name="name" type="text" id="name">
    <input type="submit" name="Submit" value="Submit">
    </form>
    This produces:
    name is defined as
    Array ( [name] => fellow [Submit] => Submit )

    So $_POST has the defined var but $name is no longer automatically defined.
    What did they do to the configuration?

    TIA!

    jg


  • matty

    #2
    Re: what has Hostway done to PHP? Form variables suddenly undefined in previously working forms

    Andy Hassall wrote:
    [color=blue]
    > On Wed, 27 Aug 2003 14:48:46 -0500, "jerrygarci uh"
    > <designs@no.spa m.nolaflash.com > wrote:
    >[color=green]
    >> echo "<h3>name is defined as $name</h3>";[/color]
    >
    > Search for 'register_globa ls'.
    >
    > --
    > Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
    > Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)[/color]

    Sod it, I'll do a Wiki at the weekend!

    Matt

    Comment

    • Matthias Esken

      #3
      Re: what has Hostway done to PHP? Form variables suddenly undefined in previously working forms

      "jerrygarci uh" <designs@no.spa m.nolaflash.com > schrieb:
      [color=blue]
      > So $_POST has the defined var but $name is no longer automatically defined.
      > What did they do to the configuration?[/color]

      register_global s = off

      Regards,
      Matthias

      Comment

      • jerrygarciuh

        #4
        Re: what has Hostway done to PHP? Form variables suddenly undefined in previously working forms

        Yep! The jerks had stuck a php.ini in our cgi-bin with one line:
        auto_register_g lobals = off


        Arrrrrrrrrrrrgh !! Lost money. Feh!


        Thanks all! Much obliged!


        jg




        "jerrygarci uh" <designs@no.spa m.nolaflash.com > wrote in message
        news:vW73b.2580 6$xf.18726@lake read06...[color=blue]
        > Hostway swears they didn't do anything but mysterious breakdowns have made
        > us do the following test:
        > <?
        > if ($_POST) {
        > echo "<h3>name is defined as $name</h3>";
        > print_r($_POST) ;
        > exit;
        > }
        > ?>
        >
        > <form name="form1" method="post" action="test.ph p">
        > <input name="name" type="text" id="name">
        > <input type="submit" name="Submit" value="Submit">
        > </form>
        > This produces:
        > name is defined as
        > Array ( [name] => fellow [Submit] => Submit )
        >
        > So $_POST has the defined var but $name is no longer automatically[/color]
        defined.[color=blue]
        > What did they do to the configuration?
        >
        > TIA!
        >
        > jg
        >
        >[/color]


        Comment

        • Richard Hockey

          #5
          Re: what has Hostway done to PHP? Form variables suddenly undefined in previously working forms


          "jerrygarci uh" <designs@no.spa m.nolaflash.com > wrote in message
          news:vW73b.2580 6$xf.18726@lake read06...[color=blue]
          > Hostway swears they didn't do anything but mysterious breakdowns have made
          > us do the following test:
          > <?
          > if ($_POST) {
          > echo "<h3>name is defined as $name</h3>";[/color]

          try echo "<h3>name is defined as $_POST["name"]</h3>";

          I would say your webhost has just upgraded their version of PHP, to one
          which has register_global s set to 'off;' by default. To access form
          variables you can use the $_POST and $_GET arrays:

          POST method - $_POST["form_element_n ame"]

          GET method - $_GET["forn_element_n ame"]
          [color=blue]
          > <form name="form1" method="post" action="test.ph p">
          > <input name="name" type="text" id="name">
          > <input type="submit" name="Submit" value="Submit">
          > </form>
          > jg[/color]


          Comment

          Working...