PHP 5 Upgrade, now site won't pass variables

PHP 5 Upgrade, now site won't pass variables

Posted by: kngtaco
Posted on: 2007-02-09 09:44:00

I just upgraded one of my sites to PHP 5 from PHP 4.

But now the site won't pass the variables from one page to another.

Example: mysite.com/index.php?goto=january

won't go anywhere. Any ideas?

Re: PHP 5 Upgrade, now site won't pass variables

Posted by: scjessey
Posted on: 2007-02-09 10:40:00

You need to read and inwardly-digest this.

Re: PHP 5 Upgrade, now site won't pass variables

Posted by: DrJones
Posted on: 2007-04-24 12:37:00

PHP 5 has register_globals off. This is a good thing, as it prevents data forgery/manipulation through bogus GET/POST requests.

If you edit index.php to check $_GET['goto'] instead of $goto everything should work as expected. Of course, you'll need to do the same for any other GET variables you use (so if you have a page number specified like "index.php?goto=january&page=2", you'd need to access $_GET['page'] instead of $page). If you have any questions feel free to message me :)

Tags: php 5variablesmysitephp 4goto