magic quotes and register globals

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

    magic quotes and register globals

    even though register globals is disabled by default, i'm currious as to
    how it and magic quotes interact. consider the following code:

    <?
    // assuming $_GET['var']='"test"' and register globals enabled
    echo $var;
    ?>

    will the output be "test" or \"test\"?

  • ZeldorBlat

    #2
    Re: magic quotes and register globals

    First of all, magic quotes and register globals have nothing to do with
    each other. If register globals was enabled in your example above, a
    variable $var would automatically available. If register globals is
    disabled, it won't be available as $var, but rather as $_GET['var'] (or
    $_POST['var'], etc.).

    If you have magic_quotes_gp c enabled, your example will output \"test\"
    regardless of the register globals setting.

    Comment

    Working...