Hi, Im populating a page of thumbs using a php script. Im trying to echo out the description as the title of the overlay but keep getting a parse error : Parse error: syntax error, unexpected $end. I know this is usually from a missing curly bracket, but that doesnt seem to be the case. I'm not exactly new to web design, but I am just trying to fool around with some ideas. Most of my code comes from the examples on the front page.

Thanks, heres the code I have so far. The parse error is for the last line.


<?php 
include 'dbc.php';
page_protect();

?>
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!-- DOCTYPE is always recommended. see: http://www.quirksmode.org/css/quirksmode.html -->

<head>

	<link rel="stylesheet" type="text/css" href="http://static.flowplayer.org/tools/css/standalone.css"/>

	<title>My Account</title>
	
	<script type="text/javascript" src="js/jquery.tools.min.js"></script>	
	<!-- <script src="http://cdn.jquerytools.org/1.1.2/full/jquery.tools.min.js"></script> -->
	
</head>

<body>

<link rel="stylesheet" type="text/css" href="css/myaccount.css"/>

<style>

/* black version of the overlay. simply uses a different background image */
div.apple_overlay.black {
	background-image:url(http://static.flowplayer.org/tools/img/overlay/transparent.png);		
	color:#fff;
}

div.apple_overlay h2 {
	margin:10px 0 -9px 0;
	font-weight:bold;
	font-size:14px;
}

div.black h2 {
	color:#fff;
}

#triggers {
	margin-top:10px;
	text-align:center;
}

#triggers img {
	background-color:#fff;
	padding:2px;
	border:1px solid #ccc;
	margin:2px 5px;
	cursor:pointer;
	-moz-border-radius:4px;
	-webkit-border-radius:4px;
}
</style>

<!--[if lt IE 7]>
<style> 
div.apple_overlay {
	background-image:url(images/overlay_IE6.gif);
	color:#fff;
}

/* default close button positioned on upper right corner */
div.apple_overlay div.close {
	background-image:url(images/overlay_close_IE6.gif);

}	
</style>
<![endif]-->

<?php
    
      
		$user_id = $_SESSION['user_id'];
		#echo $user_id;
		require 'database.php';
		$query = "SELECT id,user_name, title, src FROM photos";		
		//$query = "SELECT max(id) FROM photos";
		
		$query2 = "SELECT user_name FROM users WHERE id=$user_id";
		#echo $query2;
		$result = $mysqli->query($query) or die(mysqli_error($mysqli));
		$username = $mysqli->query($query2) or die(mysqli_error($mysqli));
		$A = $username->fetch_object();
	        $userName = $A->user_name;

	        
	        
	        
	        $sql = "select max(id)+1 as maxid from photos";
        	 $result2 = mysql_query($sql);
        	 $field = mysql_fetch_array($result2);

		if ($result) {
 			 echo "<ul id='photos'> 
";

  			  while ($row = $result->fetch_object()) {
			  	
  			  $title = $row->title;
   			  $src = $row->src;
   			  $username_2 = $row->user_name;
    			  $id = $row->id;
    			  $Description = $row->description;
    			  $photo_path='photos/'.$userName.'/'.$src.'-desc.php';

	if($userName == $username_2){
	$descr = <<<DESCR
	<?php
	<div id="triggers">
	<img src="photos/$userName/thumbs/$src" rel="#photo1"/>
	</div>
	<div class="apple_overlay black" id="photo1">
	<img src="photos/$userName/$src" />
	<div class="details">
	<h2>$title</h2>
	<p></p>
	</div>
	</div>
	<?
	DESCR;
	

	
	$print_html= htmlentities($descr);
	echo $print_html;
	

	}
    }
}
?>

<script>

$(function() {
	$("#triggers img[rel]").overlay({effect: 'apple'});
});
</script>
</body>