dumb php question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mrthumbs
    salad tossing sig guy
    • Apr 2002
    • 11702

    #1

    dumb php question

    just moved our databases to a new server
    running the latest version of php and mysql.

    Expected to run into a lot of shit but none of that
    until this little fucking issue came up. And im TIRED and
    not in the fucking mood.

    Everything works but for some reason php
    doesnt allow me to pass variables through the url
    (which is quite essential )

    www.bla.com/bla.php?var=hello

    well..

    content bla.php:
    <?
    echo $var;
    ?>

    $var is empty instead of 'hello'.

    How do i enable this and why the fuck is this disabled?
  • Apollo
    Confirmed User
    • Sep 2002
    • 433

    #2
    If you're using PHP 4.2+ you either need to alter the php.ini to have global variables enabled, or you need to change your PHP scripts around to initially grab the variables

    In regards to your example

    http://www.bla.com/bla.php?var=hello

    the line

    $var = $_GET["var"];

    would give the variable $var the value of hello.

    -----------
    Free automated way to rotate sponsor gallery thumbnails on your sites
    TgpWizards - Free TGP Gallery submission system

    Comment

    • Madball
      Confirmed User
      • May 2002
      • 748

      #3
      I remember my programmer dude tell me to tell my host to have them compile "php with globals on" whatever that means. He said this was essential for var passing.
      <a href="http://www.homepageofthedead.com"><img src="http://board.gofuckyourself.com/images/globill_88x31.gif"></a>

      Comment

      • stanton
        So Fucking Banned
        • Jun 2002
        • 2640

        #4
        who is php?!

        Comment

        • stanton
          So Fucking Banned
          • Jun 2002
          • 2640

          #5
          naw thats a dumb question

          Comment

          • mrthumbs
            salad tossing sig guy
            • Apr 2002
            • 11702

            #6
            aha.. so global variables are stored in an array for the new php versions! Ok.. thanks.. that makes sense.. let me see if i can change the .ini on the fly.

            REALLY appreciate that reply. thanks

            Comment

            • Triple 6
              Confirmed User
              • Feb 2002
              • 5394

              #7
              Whenever PHP acts up, always check your php.ini
              SIG TOO SMALL! Maximum 1200x600 button and no more than 30 text lines of ALL SIZES and COLORS. Unless your sig is for a GFY top banner sponsor, then you may use a 6240x4800 instead of a 1024x800.

              Comment

              • Bad B0y
                Confirmed User
                • Aug 2002
                • 160

                #8
                The value 'hello' would be stored in: $_GET['var']

                I new versions of PHP(4.2+) has register_globals in php.ini disabled to encourage 'good' programming.

                Edit php.ini: register_globals = On

                and it should be behave as expected.

                Comment

                • mrthumbs
                  salad tossing sig guy
                  • Apr 2002
                  • 11702

                  #9
                  yep.. just figured that out.. thanks!

                  thought this would turn out in a nightmare but it's
                  fixed and everything works stable and fine now..

                  Running through the final tests and getting some sleep!!

                  thanks..

                  Comment

                  Working...