variable passed in through header

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

    variable passed in through header

    We recently upgraded PHP and variables that were once passed through the URL are no longer
    recognized.

    Example:

    Lower TCO with powerful, on-premise Oracle hardware solutions that include unique Oracle Database optimizations and Oracle Cloud integrations.


    Within the test.php code:

    <?php
    session_start() ;

    $defectID = (int)$defectID;

    if ( $defectID != 2 ) {
    // This should not execute, but does.
    echo "Error: $defectID";
    exit;
    }

    ?>

    Help?
  • Tom Thackrey

    #2
    Re: variable passed in through header


    On 7-Oct-2003, Owen Funkhouser <funk@highwaay. net> wrote:
    [color=blue]
    > We recently upgraded PHP and variables that were once passed through the
    > URL are no longer
    > recognized.
    >
    > Example:
    >
    > http://www.sun.com/test.php?defectID=2
    >
    > Within the test.php code:
    >
    > <?php
    > session_start() ;
    >
    > $defectID = (int)$defectID;
    >
    > if ( $defectID != 2 ) {
    > // This should not execute, but does.
    > echo "Error: $defectID";
    > exit;
    > }
    >
    > ?>
    >
    > Help?[/color]

    The newer PHP has register_global s off by default. Either set it on or
    change your references to $_GET['defectID'] or $_REQUEST['defectID'] or use
    import_request_ variables()

    See



    --
    Tom Thackrey

    tom (at) creative (dash) light (dot) com
    do NOT send email to jamesbutler@wil lglen.net (it's reserved for spammers)

    Comment

    Working...