Announcement

Collapse
No announcement yet.

Variables with Register_Globals On

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Variables with Register_Globals On

    How would i use variables with register_globals on.

    like
    PHP Code:
    <?
    if($blah==""
    {
    -
    code here-
    }
    ?>
    Turns up white, and I forgot how to use the variables w/ it On. I know that $blah won't work by itself.

    Does something have to be infront of it?

  • #2
    I assume you're passing $blah by the URL? If so...

    PHP Code:
    <?
    if($_GET['blah']=="")
    {
       -
    code here-
    }
    ?>
    OR

    PHP Code:
    <?
    isset($_GET['blah']) ? $blah $_GET['blah'] : $blah false;
    if(
    $blah=="")
    {
       -
    code here-
    }
    ?>
    Last edited by CeleronXT; Mon 15 Sep '03, 11:52am.
    "63,000 bugs in the code, 63,000 bugs, you get 1 whacked with a service pack, now there's 63,005 bugs in the code."
    "Before you critisize someone, walk a mile in their shoes. That way, when you critisize them, you're a mile away and you have their shoes."
    Utopia Software - Current Software: Utopia News Pro (news management system)

    Comment


    • #3
      You'll likely need more then the $_GET array to write your scripts effectively, here's something you might want to take a look at: http://ca3.php.net/manual/en/languag...predefined.php

      Comment


      • #4
        Thank You!

        Comment


        • #5
          You could use $_GLOBAL or $_REQUEST as well (request is cookie, get and post)

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X