Passing variables in URL not working

I developed a web site on my own dreamhost account at:

The Agents and Homes for Rent pages use links which pass a variable through the URL, so that the page reloads and displays data from the db based on the id. Example:

I recently moved the site to its permanent address (also a Dreamhost account) at: However, the passing of variables seems to be non-functional for this site in this location. I have no idea why this is happening. It still works at the previous location. I’ve re-copied pages thinking it was a code error, but the identical pages don’t work at this location.

It’s not a database problem, since the listings of rental properties and agents are both dynamic content from the database. Queries work ok.

It appears that the variable is not being passed at all when the page reloads, but the URL shows the variable in the address bar. Ideas, anyone?

Are the two domain/sites running different versions of PHP? :wink:

DreamHost has both PHP 4.4.7 and PHP 5.2.2 available by default, and they have register_globals set differently.

What you are seeing could be caused by the way the variables are passed - the one that works might be using PHP4.4.7.


A-ha! That is worth checking. I’m looking into it now…

development server: 4.4.7
live server: 5.2.3

development server: 4.4.7
live server: 5.2.3

register_globals is indeed turned off in version 5. Thanks for the tip!
Added $rental_id = $_GET[‘rental_id’]; and all is working now.

Good deal!


In that case, you will need to pick up your query string with the $_GET superglobal array.

Max discount on any plan with promocode SCJESSEYTOTAL