|
-
Dynamic Systems, Inc.
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
-
Registered User
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'];
?>
-
Dynamic Systems, Inc.
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|