When you scroll over the link in the summary page, it shows the link correctly -- meaning it shows the correct id# -- but it's not correct when the linked page opens. It only opens the first record.
Help? I am clueless and frustrated.
I tried to attach my summary page (allListings.php) and my detail page (inventory.php), but it doesn't seem that works. So let me know what you need and I will send it. Here's the code for the detail page:
Code: Select all
<?php require_once('Connections/rsGunn.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
// $id = $_REQUEST["id"];
}
return $theValue;
}
}
mysql_select_db($database_rsGunn, $rsGunn);
$query_rsInventory1 = "SELECT ap_form_1.element_1_1, ap_form_1.element_1_2, ap_form_1.element_1_3, ap_form_1.element_1_4, ap_form_1.element_1_5, ap_form_1.element_1_6, ap_form_1.element_2, ap_form_1.element_3, ap_form_1.element_16, ap_form_1.element_4, ap_form_1.element_5, ap_form_1.element_57, ap_form_1.element_6, ap_form_1.element_7, ap_form_1.element_8, ap_form_1.element_9, ap_form_1.id FROM ap_form_1 WHERE ap_form_1.id";
$rsInventory1 = mysql_query($query_rsInventory1, $rsGunn) or die(mysql_error());
$row_rsInventory1 = mysql_fetch_assoc($rsInventory1);
$totalRows_rsInventory1 = mysql_num_rows($rsInventory1);
mysql_select_db($database_rsGunn, $rsGunn);
$query_rsInventory2 = "SELECT ap_form_1.element_11, ap_form_1.element_40, ap_form_1.element_12, ap_form_1.element_32, ap_form_1.element_33, ap_form_1.element_34, ap_form_1.element_35, ap_form_1.element_8, ap_form_1.element_9, ap_form_1.element_62, ap_form_1.element_67, ap_form_1.element_66, ap_form_1.element_29, ap_form_1.element_30, ap_form_1.element_31, ap_form_1.id FROM ap_form_1 WHERE ap_form_1.id";
$rsInventory2 = mysql_query($query_rsInventory2, $rsGunn) or die(mysql_error());
$row_rsInventory2 = mysql_fetch_assoc($rsInventory2);
$totalRows_rsInventory2 = mysql_num_rows($rsInventory2);
mysql_select_db($database_rsGunn, $rsGunn);
$query_rsAllInventory = "SELECT A.*, B.option as element_67_value FROM ap_form_1 as A left join ap_element_options as B on A.element_67=B.option_id and B.element_id=67 and B.form_id = 1";
$rsAllInventory = mysql_query($query_rsAllInventory, $rsGunn) or die(mysql_error());
$row_rsAllInventory = mysql_fetch_assoc($rsAllInventory);
$totalRows_rsAllInventory = mysql_num_rows($rsAllInventory);
mysql_select_db($database_rsGunn, $rsGunn);
$query_rsDetail = "SELECT * FROM ap_form_1, ap_element_options WHERE ap_form_1.id AND ap_element_options.aeo_id";
$rsDetail = mysql_query($query_rsDetail, $rsGunn) or die(mysql_error());
$row_rsDetail = mysql_fetch_assoc($rsDetail);
$totalRows_rsDetail = mysql_num_rows($rsDetail);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sandra Gunn Properties | Our Listings</title>
<link href="css/p7iqGlobal_basic.css" rel="stylesheet" type="text/css" />
<link href="p7iq/p7iq04.css" rel="stylesheet" type="text/css" />
<!--[if lte IE 7]>
<style>
#masthead, #columnwrapper, #tnav, #columns-bottom {zoom:1;}
</style>
<![endif]-->
<link href="p7ap/p7ap_01.css" rel="stylesheet" type="text/css" media="all" />
<link href="p7tp/p7tp_10-a.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="p7ap/p7APscripts.js"></script>
<link href="css/tablestyle-list.css" rel="stylesheet" type="text/css" />
<link href="gallery/jd.gallery.css" rel="stylesheet" type="text/css">
<script src="gallery/mootools.js" type="text/javascript"></script>
<script src="gallery/jd.gallery.js" type="text/javascript"></script>
<script type="text/javascript">
function startGallery() {
var myGallery = new gallery($('featured'), {
timed: true,
<!-- delay: 7000, -->
showArrows: false,
showCarousel: false
});
}
window.onDomReady(startGallery);
</script>
<script type="text/javascript" src="p7tp/p7tpscripts.js"></script>
</head>
<body onload="P7_initTP(12,1)">
<div id="masthead">
<div id="logo"> <!-- BEGINNING MASTHEAD LOOP -->
<div id="featured">
<div class="imageElement">
<h1>Houston Homes For Sale</h1>
<p> </p>
<a href="#" title="Houston Homes For Sale" class="open"> <img src="images/slide9.jpg" alt="" class="full" /></a></div>
<div class="imageElement">
<h1>Houston Homes For Sale 10</h1>
<p> </p>
<a href="#" title="Houston Homes For Sale" class="open"> <img src="images/slide10.jpg" alt="" class="full" /></a></div>
<div class="imageElement">
<h1>Houston Homes For Sale 11</h1>
<p> </p>
<a href="#" title="Houston Homes For Sale" class="open"> <img src="images/slide11.jpg" alt="" class="full" /></a></div>
<div class="imageElement">
<h1>Houston Homes For Sale 12</h1>
<p> </p>
<a href="#" title="Houston Homes For Sale" class="open"> <img src="images/slide12.jpg" alt="" class="full" /></a></div>
<div class="imageElement">
<h1>Houston Homes For Sale 13</h1>
<p> </p>
<a href="#" title="Houston Homes For Sale" class="open"> <img src="images/slide13.jpg" alt="" class="full" /></a></div>
<div class="imageElement">
<h1>Houston Homes For Sale 14</h1>
<p> </p>
<a href="#" title="Houston Homes For Sale" class="open"> <img src="images/slide14.jpg" alt="" class="full" /></a></div>
<div class="imageElement">
<h1>Houston Homes For Sale 15</h1>
<p> </p>
<a href="#" title="Houston Homes For Sale" class="open"> <img src="images/slide157.jpg" alt="" class="full" /></a></div>
<div class="imageElement">
<h1>Houston Homes For Sale 21</h1>
<p> </p>
<a href="#" title="Houston Homes For Sale" class="open"> <img src="images/slide21.jpg" alt="" class="full" /></a></div>
</div>
<!-- END MASTHEAD LOOP --></div>
</div>
<?php require_once('inc/masthead.html'); ?>
<div id="columnwrapper">
<div id="columns-top"> </div>
<div id="c1">
<div class="content">
<?php require_once('inc/leftPanel.html'); ?>
</div>
</div>
<div id="listings"><table width="620" border="0" cellpadding="1">
<tr><td>
<div id="p7TP1" class="p7TPpanel">
<div class="p7TPwrapper">
<div class="p7TP_tabs">
<div id="p7tpb1_3"><a href="javascript:;">photos</a></div>
<div id="p7tpb1_2"><a href="javascript:;">details</a></div>
<div id="p7tpb1_1" class="down"><a class="down" href="javascript:;">overview</a></div>
<br class="p7TPclear" />
</div>
<div class="p7TPcontent">
<div id="p7tpc1_1"><table width="600" cellpadding="6">
<tr>
<td><h3><?php echo $row_rsInventory1['id']; ?> | <?php echo $row_rsInventory1['element_1_1']; ?> <?php echo $row_rsInventory1['element_2']; ?></h3></td>
<td><h3>$<?php echo $row_rsInventory1['element_3']; ?></h3></td>
</tr>
<tr>
<td colspan="2"><div align="center"><?php echo $row_rsInventory1['element_16']; ?></div></td>
</tr>
<tr>
<td colspan="2"><?php echo $row_rsInventory1['element_4']; ?><br />
<strong><?php echo $row_rsInventory1['element_5']; ?> / <?php echo $row_rsInventory1['element_6']; ?> - <?php echo $row_rsInventory1['element_7']; ?> / <?php echo $row_rsInventory1['element_8']; ?> per <?php echo $row_rsInventory1['element_9']; ?></strong><br /></td>
</tr>
<tr><td colspan="2">To schedule an appointment, contact Sandra by phone at 713.224.2777</td></tr>
</table>
<p> </p>
</div>
<div id="p7tpc1_2">
<table width="600" cellpadding="6">
<tr>
<td>Living Room: <?php echo $row_rsInventory2['element_11']; ?></td>
<td>Kitchen: <?php echo $row_rsInventory2['element_40']; ?></td>
</tr>
<tr>
<td>Dining Room: <?php echo $row_rsInventory2['element_12']; ?></td>
<td>Master Bedroom: <?php echo $row_rsInventory2['element_32']; ?></td>
</tr>
<tr>
<td>2nd Bedroom: <?php echo $row_rsInventory2['element_33']; ?></td>
<td>3rd Bedroom: <?php echo $row_rsInventory2['element_34']; ?></td>
</tr>
<tr>
<td><?php echo $row_rsInventory2['element_8']; ?> sf/<?php echo $row_rsInventory2['element_9']; ?></td>
<td>Lot: <?php echo $row_rsInventory2['element_62']; ?> /<?php echo $row_rsAllInventory['element_67_value']; ?></td>
</tr>
<tr>
<td colspan="2"><p><?php echo $row_rsInventory2['element_66']; ?></p>
<p><?php echo $row_rsInventory2['element_29']; ?></p>
<p><?php echo $row_rsInventory2['element_30']; ?></p>
<p><?php echo $row_rsInventory2['element_31']; ?></p></td>
</tr>
<tr>
<td colspan="2">To schedule an appointment, contact Sandra by phone at 713.224.2777</td>
</tr>
</table>
</div>
<div id="p7tpc1_3">
<table width="600" cellpadding="6">
<tr><td colspan="2">Lorem ipsum dolor sit amed sed diam nonummy nibh euismod tincidunt ut. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, eu feugiat nulla at vero eros et accumsan et odio qui blandit praesent luptatum augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, contuer adiping elit, sed diam nonummy nibh euismod.</td></tr></table>
</div>
</div>
</div>
<!--[if lte IE 6]>
<style type="text/css">.p7TPpanel div,.p7TPpanel a{height:1%;}.p7TP_tabs a{white-space:nowrap;}</style>
<![endif]-->
</div></td></tr></table>
</div>
<div id="columns-bottom"> </div>
</div>
<div id="footer">
<div id="footercontent">© Copyright 2001-2009. Sandra Gunn Properties. Licensed
Real Estate Broker. All rights reserved. No Part of this website may be reproduced
without the written consent of Sandra Gunn Properties. All information provided
is deemed reliable but is not guaranteed and should be independently verified.</div>
</div>
</body>
</html>
<?php
mysql_free_result($rsInventory1);
mysql_free_result($rsInventory2);
mysql_free_result($rsAllInventory);
mysql_free_result($rsDetail);
?>
Thanks in advance for your guidance.