ibanez270dx Posted August 22, 2006 Share Posted August 22, 2006 Hi, I have a portion of code in my PHP program that works on my personal server, but not on the freshly installed server here at work... Originally, my server had PHP version 4.3.11, whereas my new server has PHP 5.1.5. Here is the problem... This snippet of code no longer can pass the variables to the next page:[code=php:0]<a href="export.php?w=1&month=<? echo $today_month; ?>&year=<? echo $today_year; ?>&listorder=<? echo $listorder; ?>&filename=<? echo $thefilename; ?>" name="2excel" class="print" target="_blank"><img src="images/excel.gif" border="0"> <b>Export to Excel</b></a>[/code]However, when I use sessions, it works. I don't know what could be wrong... I'm thinking it has to do with configuration settings somehow, but I don't know what... Thanks, - Jeff Quote Link to comment Share on other sites More sharing options...
Corona4456 Posted August 22, 2006 Share Posted August 22, 2006 It could have to do with register globals. If register globals is off in your config at work but on at your home site then that could be the problem. Quote Link to comment Share on other sites More sharing options...
ibanez270dx Posted August 22, 2006 Author Share Posted August 22, 2006 It worked! Good call! Thanks! Quote Link to comment Share on other sites More sharing options...
Corona4456 Posted August 22, 2006 Share Posted August 22, 2006 Sweet! :D Your welcome! Quote Link to comment Share on other sites More sharing options...
Yesideez Posted August 22, 2006 Share Posted August 22, 2006 I always write my code as if globals are turned on.If I'm needing to carry variables from one script to another then I send them one way or another whether it be via the URL or using forms. Any variables that I'm using fresh I make sure they're clear first or set to what they need to be set to.That way when my code gets moved from server to server like a lot has done in the past I know it stands a much higher chance of working as I want it to.Never presume globals are always on or off. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.