Heres my code, which is in the head section of the page(yes, its saved as .php):

<?php
if (isset($_GET['category']))  
{	
	if ($_GET['category'] == "property" ) 
		{ $property_link = "<span>Property</span>"; $rentals_link = "<a href="listingstest.php?category=rentals">Rentals</a>";} 
		else {
			$rentals_link = "<span>Rentals</span>"; 
			$property_link =  "<a href="listingstest.php?category=property">Property</a>";
			}
}
else{
			$property_link =  "<a href="listingstest.php?category=property">Property</a>"; 
			$rentals_link = "<a href="listingstest.php?category=rentals">Rentals</a>";
	}
 ?>

I get a BLANK SCREEN as an output. I assume its just a simple thing, but for the life of me I just don't see it.

Anyone?

I should mention that there IS lots of stuff to output from the page itself, but its stopping at the code listed above. (when I remove it, the rest of the page displays fine - so obviously the error is there in that block somewhere)

You didn't escape the " characters.

Example:

$property_link =  "<a href="listingstest.php?category=property">Property</a>";

should be

$property_link =  "<a href=\"listingstest.php?category=property\">Property</a>";

OMG how the heck did I miss that! lol

thanks guys.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.