0

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?

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by verbob
0

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)

0

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>";
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.