I just switched hosts and my site has totally gotten messed up. I have one of those urls that go like this my http://mysite.com/?file=MyFile Ok, so you go to my site, mysite.com and the php calls mainpage.html. Everything looks fine and dandy. BUT when I go to another page, say Page 2 (http://mysite.com/?file=Page2) the same content from my main page comes up as opposed to the Page 2 stuff. It use to work find on my old host, but not with my new host Godaddy. Here is the code I use to use <?php $page = $HTTP_GET_VARS['file']; $extension = "txt"; if ( !$page || $page == "" ) { include "/my/path/mainpage.html"; } else ( file_exists( "/my/path/$page.$extension" ) ) ?> How can I fix this? Does anybody have another code that is Godaddy compatible? Help is much appreciated!
As per http://php.net/manual/en/language.variables.predefined.php , $HTTP_GET_VARS has been deprecated and replaced by $_GET. I would recommend looking over that page I linked to as there's probably a good chance you're using other deprecated values, too.