Image not displaying?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jiggens
Forum Commoner
Posts: 37
Joined: Sun Jul 08, 2007 4:49 pm

Image not displaying?

Post by jiggens »

Code: Select all

$query = "SELECT * from psh_siteplans WHERE communityID = '$ID' ORDER BY orderID";
				  	 $result = mysql_query($query);
					 while ($row = mysql_fetch_row($result)) {
						print "<form action=" . $_SERVER['PHP_SELF'] . "?ID=" . $ID . "&siteID=" . $row[0] . " method='POST'>";
						print "<table border='0' cellspacing='0' cellpadding='5'><tr>";
  	                  	$window = "http://homes.pacificscene.com/popup.php?type=renderings&ID=" . $row[0] .                                                                                        "','popUp','width=775,height=550'";
						
						print "<td width='206' rowspan='8' valign='top'>";
						print '<a href="javascript:;"><img border="0" src="http://homes.pacificscene.com/images/browse/renderings/' . $row[0] . '-TH.jpg" onclick="MM_openBrWindow(' . $window . ')" /></a>';
						print "</td>";
						print "<td width='135'><strong>Model</strong></td>";
                  		print "<td>" . $row[1] . "</td></tr>";
  						print "<tr><td><strong>Appx Sq. Ft</strong>.</td>";
                  		print "<td>" . $row[2] . "</td></tr>";
						print "<tr><td><strong>Stories</strong>.</td>";
                  		print "<td>" . $row[3] . "</td></tr>";
						print "<tr><td><strong>Bedrooms</strong>.</td>";
                  		print "<td>" . $row[4] . "</td></tr>";
						print "<tr><td><strong>Baths</strong>.</td>";
                  		print "<td>" . $row[5] . "</td></tr>";
  						print "<tr><td><strong>Garage</strong>.</td>";
                  		print "<td>" . $row[6] . "</td></tr>";
						
						$window = "http://homes.pacificscene.com/popup.php?type=floorplans&ID=" . $row[0] . "','popUp','width=825,height=625,scrollbars=yes'";
						
                                              if (file_exists("http://homes.pacificscene.com/images/browse/floorplans/" . $row[0] . ".jpg")) {
							print '<tr><td><a href="javascript:;" onclick="MM_openBrWindow(' . $window . ')">Floorplan</td></a>';
							print "<td>&nbsp;</td></tr>";
						}
						$window = "http://homes.pacificscene.com/popup.php?type=renderings&ID=" . $row[0] . "','popUp','width=775,height=550'";
						if (file_exists("http://homes.pacificscene.com/images/browse/renderings/" . $row[0] . "-TH.jpg")) {
						print '<tr><td><a href="javascript:;" onclick="MM_openBrWindow(' . $window . ')">Enlarged Rendering                         </td></a>';
						print "<td>&nbsp;</td></tr>";
					}                  			
    					print "</table><br />";
					}
			  ?>
reference url to look at is http://homes.pacificscene.com/browse/co ... .php?ID=14 The problem i am having is that i ma not able to get the floorplans to show up correctly if you browse to the directory : http://homes.pacificscene.com/images/browse/floorplans/ they are there and you can use the link http://homes.pacificscene.com/popup.php ... lans&ID=36 for example. and you will see that the floorplan is there i don't understand why i cant get it to show up at all? Please Help
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Did you only test the first floorplan link of your page? The one linking to http://homes.pacificscene.com/popup.php ... lans&ID=16 / http://homes.pacificscene.com/images/br ... ans/16.jpg ? That file has a size of 0 bytes.
E.g. the second link, Model 1A http://homes.pacificscene.com/images/br ... ans/15.jpg , works fine for me.
Post Reply