A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: PHP script does not understand the variables from the URL?

  1. #1
    Dynamic Systems, Inc. mikaelian's Avatar
    Join Date
    Oct 2000
    Location
    DySyst.com
    Posts
    1,383

    PHP script does not understand the variables from the URL?

    PHP script does not understand the variables from the URL?

    Hello, can you please help me with the following very strange problem? It is the first time I ever see a problem like this: the PHP script does not understand the variables passed to it by URL. To explain the point I made a very simple script test.php consisting of the text:

    <?php
    echo $signal;
    ?>


    So if we call this script by browser as:
    www.MyServer.com/test.php?signal=777
    then it need output the text “777”. However, it does not do that.

    To test if PHP in general works on this server I made another simple script like:

    <?php
    $signal = 888;
    echo $signal;
    ?>


    Which DID output the text “888”

    Can somebody have an idea what is the problem?

    Thank you!
    Dynamic Systems
    Professional Web Development Solutions!
    www.DySyst.com

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    That will only work if register_globals is turned on. If it isn't, which has been the default for some years now (due to security reasons), you need to grab the variable from the $_GET array:
    PHP Code:
    <?php
    echo $_GET['signal'];
    ?>

  3. #3
    Dynamic Systems, Inc. mikaelian's Avatar
    Join Date
    Oct 2000
    Location
    DySyst.com
    Posts
    1,383
    Thank you very much! It worked.
    Dynamic Systems
    Professional Web Development Solutions!
    www.DySyst.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center