I use the $_GET array to access all my get varibles. Like this:
url.php?param=fu¶m2=bar
<body>
<?
echo $GET[param];
echo $GET[param2];
?>
</body>
results in:
fubar
I think this is more secure, and keeps it easy to know where the varible's are coming from when I go back to my code later.
However when I went to windows with some code I had written in linux, this caused some problems. Anywhere I did this it gave me the Undefiened Constant / Undefined Varible message. I tryed using quotes, and for some reason this worked sometimes such as:
echo $_GET["param"];
However, othertimes, such as when I was trying to set varibles to these, and when I would test them in an if statement, it would give me the error.
Simply changing the error logging was all it took on windows to fix this "broken code".
Changed error_reporting to this:
error_reporting = E_ERROR & ~E_NOTICE
Thanks Mark. 🙂
Mathew
mat@glizard.com