Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- greenhorn question
- Yun Guan
November 11, 2004, 8:51 am
rate this thread
I start learning PHP a couple of days ago. I am running PHP 4. on Red Hat 9.
Look like things are setup correct. I have no problem running since script
However, I can't get the any variable output from the following, whether
clicking on the "Test" or not. $QUERY_STRING, $Year, and $Month are always
echo "QUERY_STRING = $QUERY_STRING <br>\n";
echo "Year = $Year<br>\n";
echo "Month = $Month<br>\n";
echo "<a href=\"./test1.php?Year=2005&Month=1\">Test</a>";
Please help. Thanks a bunch.
Re: greenhorn question
You should avoid short open tags (may be disabled on the server and may
cause problems with XML). Use <?php ... ?> instead for portable code.
Escaping from HTML
In recent PHP versions register_globals is turned off, that's why these
variables no longer exist.
Chapter 28. Using Register Globals
Use the superglobal arrays $_SERVER, $_GET etc. to access their values: