Please Help!!! Im just stuck and going crazy.
Here's my problem, keep in mind Im still learning. This is a site Im doing for someone else that was already created.
Im on this PHP file called rental_profile_dewdrop
and it displays the pictures I needed by calling them from my PHP files
I then want to be able to make one if the photos on the pages a link back to itself, but it would change 2 of the photos on the page based on info from my php files.
I will place all cap notes where the image is and the info Ive place.
Of course it does not work, Please help.
Expand|Select|Wrap|Line Numbers
- <?
- if (!$Link)
- include("global.inc.php");
- $query =
- "SELECT ".
- "* ".
- "FROM ".
- "community ".
- "WHERE ".
- "community_id = '14'";
- $res = mysql_query($query) or die(mysql_error());
- $community = mysql_fetch_assoc($res);
- mysql_free_result($res);
- $query =
- "SELECT ".
- "* ".
- "FROM ".
- "communityphoto ".
- "WHERE ".
- "communityphoto_community_id = '14' AND
- communityphoto_community_id_sub = ''".
- "ORDER BY ".
- "communityphoto_order";
- $pres = mysql_query($query) or die(mysql_error());
- while ( $prow = mysql_fetch_assoc($pres) )
- $photo[] = $prow;
- mysql_free_result($pres);
- ?>
- <?php echo('<?xml version="1.0" encoding="UTF-8"?>'); ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Burkentine & Sons</title>
- <link href="common/styles/jquery.lightbox-0.5.css" rel="stylesheet" type="text/css" />
- <link href="common/styles/global.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
- <script type="text/javascript" src="common/scripts/jquery.lightbox-0.5.js"></script>
- <script type="text/javascript" src="common/scripts/jquery.cycle.all.min.js"></script>
- <script type="text/javascript" src="common/scripts/global.js"></script>
- <script src="../SpryAssets/SpryEffects.js" type="text/javascript"></script>
- <style type="text/css">
- <!--
- .community_module_photoCopy {
- width: 220px;
- float: left;
- margin-right: 0px;
- margin-bottom: 10px;
- }
- .style3 {
- font-family: Georgia, "Times New Roman", Times, serif;
- font-weight: bold;
- border-bottom-width: 1px;
- border-bottom-style: solid;
- border-bottom-color: #C2BC9A;
- padding-bottom: 4px;
- }
- #renter_results_col01 {
- border: 0;
- width: 250px;
- float: left;
- }
- #renter_results_col02 {
- float: right;
- width: 391px;
- }
- .imagesthumbnailrental {
- height: 150px;
- width: 120px;
- float: left;
- margin-left: 10px;
- }
- -->
- </style>
- </head>
- <body>
- <!-- wrapper -->
- <div id="wrapper">
- <div id="wrapper_inner">
- <!-- inside_header -->
- <div id="inside_header">
- <?php include("header.php"); ?>
- </div>
- <!-- inside_header -->
- <div class="clear"></div>
- <!-- content -->
- <div id="inside_content_wrapper">
- <div class="inside_content_inner">
- <div class="inside_page_header_blank">
- <h1>Rentals:
- <?= $community['community_name'] ?> -
- <?= $community['community_city'] ?>,
- <?= $community['community_state'] ?></h1>
- </div>
- <div class="clear"></div>
- <div class="inside_content_col01_02_wrapper">
- <div class="community_module_wrapper">
- <!---->
- <div class="community_module_wrapper_inner">
- <div id="renter_results_col01">
- <div class="community_module_photoCopy">
- <? $logo = $community['community_logo'];
- if ( $logo ) { ?>
- <img src="CmImageDir/<?= $logo ?>" width="210"
- height="*" border="0" /><? } else { ?><? } ?>
- </div>
- <div class="clear" style="border:0; margin:0; padding:0;"></div>
- <div class="rental_module_text_box" style="float: left; margin:0; padding: 0; border: 0; width: 225px;">
- <h4><span class="style3">
- <?= $community['community_addr'] ?>
- <?= $community['community_city'] ?>
- ,
- <?= $community['community_state'] ?>
- <?= $community['community_zip'] ?>
- </span> </h4>
- <h4><strong><br />
- Price Range: </strong><?= $community['community_pricerange'] ?></h4>
- <h4 ><strong>Square Foot Range: </strong><?= $community['community_sqftrange'] ?></h4>
- <h4> <strong>Model Hours: </strong><?= nl2br($community['community_hours']) ?></h4>
- <h4 ><strong>Agent Info: </strong>
- <?= ($community['community_agents']) ?></h4>
- <h4 ><strong>Phone: </strong><?= $community['community_phone'] ?></h4>
- <h4 ><strong>Fax: </strong><?= $community['community_fax'] ?></h4>
- </div>
- <div class="clear" style="border:0; margin:0; padding:0;"></div>
- <p><a href="CmImageDir/DDsitemap.pdf" target="_blank" >
- <img src="CmImageDir/DDsitemap.png" width="200" border="0" /></a> </p>
- <div class="clear" style="border:0; margin:0; padding:0;"></div>
- </div>
- <!--Second column starts containing thumbnail images-->
- <div id="renter_results_col02">
- <div class="imagesthumbnailrental">
- THIS IS WERE A PHOTO IS LOCATED AND IM TRYING TO MAKE IT A LINK BACK TO THIS PAGE AND ALSO INCLUDE VARAIBLES FROM MY PHP CHARGE FOR THE 2 NEW IMAGES. THESE IMAGES WOULD REPLACE THE ONES SHOWING AT THIS TIME.
- <a href="rentals_profile_dewdrop.php
- <?= $communityphoto['communityphoto_community_id_sub = 1'] ?>">
- <img src="CmImageDir/rental14dd_u1_5_thumb.png" /></a>
- <p align="center">Units 1-5 and 28-35 </p>
- </div>
- <div class="imagesthumbnailrental"> <img src="CmImageDir/rental14dd_u1_5_thumb.png" /><p align="center">Units 6-7</p>
- </div>
- <div class="imagesthumbnailrental"> <img src="CmImageDir/rental14dd_u1_5_thumb.png" /><p align="center">Units 8-11</p>
- </div>
- <div class="imagesthumbnailrental"> <img src="CmImageDir/rental14dd_u1_5_thumb.png"/><p align="center" >Units 12-13</p>
- </div>
- <div class="imagesthumbnailrental"> <img src="CmImageDir/rental14dd_u1_5_thumb.png" /><p align="center">Units 14-15</p>
- </div>
- <div class="imagesthumbnailrental"> <img src="CmImageDir/rental14dd_u1_5_thumb.png" /><p align="center">Units 16-21 & 22-27</p>
- </div>
- <div style="width:200px; float:left; margin-left: 125px; ">
- <img src="common/images/Arrow_Button_Rentals.png" alt="" width="175" /></div>
- </p></div>
- <div class="clear"></div>
- <div id="rental_nav_bar">
- <ul>
- <li id="rental_nav_profile"><a href="contact.php">Inquire about Rental</a></li>
- <li id="rental_nav_homes">< <?php if ($community['community_vtour']) { ?><? } ?><a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=<?= $community['community_addr'] ?>+<?= $community['community_city'] ?>+<?= $community['community_state'] ?>+<?= $community['community_zip'] ?>&ie=UTF8&z=17&iwloc=A" target="_blank">Google Directions</a></li>
- <li id="rental_nav_plans"><a href="">Rental Application</a></li>
- <li id="rental_nav_contact"><a href="rentals.php">
- Back to Rentals</a></li>
- </ul>
- </div></div></div>
- <div class="community_header_profile"><h1>Community Profile</h1></div>
- <div class="inside_content_col01_wrapper">
- <div class="inside_content_col01_top"></div>
- <div class="inside_content_col01_rpt">
- <div class="inside_content_col01_wrapper_inner">
- <h1><?= $community['community_name'] ?></h1>
- <p><strong>Units 1-5 & 28-35<br />
- Units 6-7<br />
- Units 8-11<br />
- Units 12-13<br />
- Units 14-15<br />
- Units 16-21 & 22-27 </strong></p>
- <h2 style="margin-left: -10px">Rental Amenities</h2>
- <ul>
- <? $amen_arr = explode("~", $community['community_amenities']);
- foreach ( $amen_arr as $a ) { ?>
- <li><?= $a ?></li>
- <? } ?>
- </ul>
- <p> </p>
- <h2 style="margin-left: -10px">School Info</h2>
- <ul>
- <li><a href="<?= $community['community_school_district_url'] ?>"><?= $community['community_school_district'] ?></a></li>
- <li><?= $community['community_eschool'] ?></li>
- <li><?= $community['community_mschool'] ?></li>
- <li><?= $community['community_hschool'] ?></li>
- </ul>
- </div>
- </div>
- <div class="inside_content_col01_edge"></div>
- </div>
- <script type="text/javascript">$(function(){$('.inside_content_col02_wrapper a').lightBox();});</script>
- <div class="inside_content_col02_wrapper" style="margin-right: 0px; width: 495px;">
- <h2><?= $community['community_name'] ?> Image Gallery</h2>
- <div class="clear"></div>
- <? if ($photo[0]) { ?><a href="CmImageDir/<?= $photo[0]['communityphoto_file'] ?>" title="<?= $photo[0]['communityphoto_name'] ?>"><span class="inside_content_col02_wrapper" style="margin-right: 0px; width: 495px;"><a href="CmImageDir/<?= $photo[0]['communityphoto_file'] ?>" title="<?= $photo[0]['communityphoto_name'] ?>"><img src="CmImageDir/<?= $photo[0]['communityphoto_file'] ?>" width="485" class="photo_edge" border="0" /></a><? } else { ?>
- <img src="common/images/noimage_300x250.png" alt="" width="485" height="405" class="photo_edge"/>
- <? } ?>
- <p style="padding-top: 10px;">Additional images (Click to enlarge)</p>
- <? if (sizeof($photo) > 1) { ?>
- <? for ( $p = 1; $p < sizeof($photo); $p++ ) { ?>
- <a href="CmImageDir/<?= $photo[$p]['communityphoto_file'] ?>" title="<?= $photo[$p]['communityphoto_name'] ?>">
- <img src="CmImageDir/<?= $photo[$p]['communityphoto_file'] ?>" width="100" class="photo_edge" style="margin-right: 8px;" /> </a>
- <? } } ?>
- <p> </p>
- <h2>Rental Description and Directions</h2>
- <div class="clear"></div>
- <p><?= nl2br($community['community_desc']) ?></p>
- </div>
- </div>
- <?php include("inside_sidebar_right.php"); ?>
- </div></div>
- </div>
- <!-- content -->
- <div class="clear"></div>
- <!-- footer -->
- <?php include("footer.php"); ?>
- <!-- footer -->
- </div>
- <!--wrapper_inner -->
- </div>
- <!--wrapper -->
- </body></html>