PHP problem...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swingerman
    Registered User
    • Jul 2003
    • 223

    #1

    PHP problem...

    Hi,
    a new HD has been installed on my server and now PHP is acting weird. A tech. is working on it but has some problems figuring it out. We all know that this can happen every now and then: just a small thing and we just don't see the problem ;).
    Perhaps one of you knows what's wrong...

    this is what happens:

    test.php?name=Swingerman

    test.php looks like this:
    <?php
    echo( "Hello $name!" );
    ?>

    But when opening test.php?name=Swingerman in my browser, I only get:
    Hello !

    So, the problem is that PHP doesn't recognize the $name variable.

    has anybody here an idea what to do? is it anything in php.ini?

    ICQ: 159190441

    Thanx much!
  • Babaganoosh
    ♥♥♥ Likes Hugs ♥♥♥
    • Nov 2001
    • 15841

    #2
    Turn safe mode off.
    I like pie.

    Comment

    • 4Pics
      Confirmed User
      • Dec 2001
      • 7952

      #3
      echo $_GET['$name']

      Comment

      • myneid
        Confirmed User
        • Jan 2003
        • 738

        #4
        you need to enable globals in the php.ini
        Tanguy 0x7a69 inc. Programmer/President/CEO
        http://www.0x7a69.com
        A Leader in Programming since 1996
        PHP, Ruby on Rails, MySQL, PCI DSS, and any Technical Consulting

        Comment

        • SoftGalleries
          Confirmed User
          • Aug 2003
          • 247

          #5
          http://www.SoftGalleries.com

          Comment

          • Samoan
            Confirmed User
            • Aug 2003
            • 203

            #6
            Don't you have to put this in the script:

            $name = $_REQUEST['name'];
            Samoan

            Comment

            • swingerman
              Registered User
              • Jul 2003
              • 223

              #7
              Originally posted by myneid
              you need to enable globals in the php.ini
              thanx! that did it!
              and thanx from my tech, too.

              as I thought: just a small thing
              computers...

              Comment

              • swingerman
                Registered User
                • Jul 2003
                • 223

                #8
                Originally posted by Samoan
                Don't you have to put this in the script:

                $name = $_REQUEST['name'];
                yes, this is also possible. but the other way is easier because less to write ;)

                with globals enabled it's working now...

                Comment

                Working...