OK - now I'm going to need your help in getting the destinations on this page to appear in a grid layout as they do on the original page created by DA.
I'm going to assume it'll be reasonably straightforward for you to guide me through it...
Basically, this is the original page created by DA that lists the destinations on their own :
destinationstemp.php
(One issue there is the images extending beyond 182px wide, even though I've specified a width for the image. But that's less of a concern just now - I can add in some code to fix that that I've used in the past).
So I'd like the destinations to appear in that same grid layout on the package details page here :
packageDetailsTest4.php?packageID=140
I assume its just a case of reusing some code from the destinationstemp.php page - I could have a stab at it manually, but I'd likely mess it all up....
Presumably this is the code that sets it all up in the destinationstemp.php page :
<?php
$maxRows_WADAdestinations = 20;
$pageNum_WADAdestinations = 0;
if (isset($_GET['pageNum_WADAdestinations'])) {
$pageNum_WADAdestinations = $_GET['pageNum_WADAdestinations'];
}
$startRow_WADAdestinations = $pageNum_WADAdestinations * $maxRows_WADAdestinations;
mysql_select_db($database_connPackages, $connPackages);
$query_WADAdestinations = "SELECT destinationID, destination, description, shortdesc, image_main, image_2, image_3 FROM destinations ORDER BY destination ASC";
setQueryBuilderSource($query_WADAdestinations,$WADbSearch1,false);
$query_limit_WADAdestinations = sprintf("%s LIMIT %d, %d", $query_WADAdestinations, $startRow_WADAdestinations, $maxRows_WADAdestinations);
$WADAdestinations = mysql_query($query_limit_WADAdestinations, $connPackages) or die(mysql_error());
$row_WADAdestinations = mysql_fetch_assoc($WADAdestinations);
if (isset($_GET['totalRows_WADAdestinations'])) {
$totalRows_WADAdestinations = $_GET['totalRows_WADAdestinations'];
} else {
$all_WADAdestinations = mysql_query($query_WADAdestinations);
$totalRows_WADAdestinations = mysql_num_rows($all_WADAdestinations);
}
$totalPages_WADAdestinations = ceil($totalRows_WADAdestinations/$maxRows_WADAdestinations)-1;
?>
<?php
$queryString_WADAdestinations = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_WADAdestinations") == false &&
stristr($param, "totalRows_WADAdestinations") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_WADAdestinations = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_WADAdestinations = sprintf("&totalRows_WADAdestinations=%d%s", $totalRows_WADAdestinations, $queryString_WADAdestinations);
?>
But I'm not sure how to go about reusing it with the new query in the packageDetailsTest4.php page without messing it up.
I have at least changed the recordset name to WADAdestinations which should help.
I've attached a zip of both pages - if you could advise which code to use in the new page to achieve the grid layout I'd be very grateful.