Detail Page for PHP
Hi there,
CS3 with PHP and mySQL db.
I cannot get the go to detail page to work properly. I have
downloaded the
"Go to detail page" extention from
http://www.dengjie.com which
seems to
work.
BUT, what do I do on the detail page? In ASP there is a SB
that says "Go to
Specific Record" but this is not there with PHP.
I will really appreciate any help. At the moment the only
thing it does
when clicking to my "More details" link, is to go to the
first record.
Thank you very much!
Deon
Deon wrote:
> I cannot get the go to detail page to work properly. I
have downloaded the
> "Go to detail page" extention from
http://www.dengjie.com which
seems to
> work.
I don't know anything about that extension, nor do I read
Chinese, so
the following information is based on how to go to a detail
page
correctly without using any third-party extension.
> BUT, what do I do on the detail page? In ASP there is a
SB that says "Go to
> Specific Record" but this is not there with PHP.
The way that you handle this with PHP is to append a query
string to the
URL in the "more details" link. Let's say that the primary
key of your
database table is product_id, the link to the detail page
needs to look
like similar to this:
<a href="product_details.php?product_id=9">More
details</a>
In product_details.php, you create a recordset that uses the
URL
variable, product_id, as a filter.
So, how do you add the correct product_id into the "more
details" link?
1. Select the words that create the link.
2. Click the folder icon to the right of the Link field in
the Property
inspector.
3. Select the details page in the dialog box.
4. Before closing the dialog box, click the Parameters
button.
5. In the Parameters dialog box, type the name of the primary
key
(product_id in this case) into the Name field.
6. Click the lightning bolt icon to the right of the Value
field.
7. This opens the Dynamic Data dialog box, where you should
select the
primary key (product_id) from the recordset.
8. Click OK three times to close all the open dialog boxes.
This creates the following code in your link:
<a href="product_details.php?product_id=<?php echo
$row_recordsetName['product_id']; ?>">More
details</a>.
The large number of steps makes it sound complicated, but
it's actually
very simple once you have done it a couple of times.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Similar Messages
-
"search summary region" not in account details page for trx type invoice
Hi All,
This is the issue being faced by the customer.
OIR.CU3 provided an update adding a "search summary region" in account details page.
After applied CU3, in our development instance, Search summary region is missing in account details page when perform searches with search type: invoice, credit memo or payment. But search summary region is present by search type "all receivables" or "all transaction".
We do not have any customizations in the account details page. But we do have custom ARI_CONFIG package.
Custom ARI_CONFIG package is suspicious on this issue based on:
1) We have custom INV/CM/Payment search codes in the search_custom_trx procedure, which provides the search results in acct details page.
2) The info displayed in search summay region is based on the search results from ARI_CONFIG
3) We don't have any custom code in ari_config package in vision and vision shows successfully the search summary region with search by INV/CM/Payment/All_trx/All_receivables.
Since custom ARI_CONFIG package is supported by oracle customer would liek to know where is the search summary region gets calculated.
This issue of this section not being displayed is not there when the custom package is not used.
Please provide your valuable inputs on this.
SR 7466789.993
Customer: ADP INC
Regards,
VijayaHi Kumar,
Thank you very much for responding on the query. Can you please provide me the exact file name as the customer would like to know which part of the code (which function call) he should make so that the summary section is seen even when the custom package is used.
Also can you please let me did even anyone complain that the summary section is not shown when the custom package is used.
Thanks for your help in advance.
Regards,
Vijaya
Edited by: user782870 on May 6, 2009 2:53 AM -
I would like to have the ability for the user to edit the property 'Status Message'. In the properties it says that it should be available in the details section however I am not seeing it there. Does anyone know if I might have something set
incorrectly or is this expected behavior.
Steven Albrecht
University of Colorado Denver
Steven AlbrechtHi Steven,
For this issue, I'm trying to involve someone familiar with this topic to further
look at it.
Thanks,
Eric Tao
TechNet Community Support -
Hi There,
I am creating a dynamic link from a news item in my index.php
page. I have highlighted the field (in index.php) I want to use as
the dynamic link to the detail page and used the 'go to detail page
for PHP server behaviour'. This links to my detail page called
'newscontent.php'. On newcontent.php, I have created a filtered
recordset which filters by newsID (which is the primary key in the
Mysql database). Using the simple recordset dialog, I did a test
and entered in a test value for URL parameter: newsID. This works
successfully and returns the appropriate records from the database.
Therefore as things seem to be working so far, I have dragged the
newsTitle and newsContent onto my detail page so that when the user
clicks on the link in the index.php page, it will show the title
and content in the detail page.
However things are not working. In the newscontent.php, when
I do live data view, nothing appears on the page (which is weird
because the recordset works fine!!). Even when I view my index.php
page in my browser and try and link to the detail page, it goes to
the detail page no problem but no data is on the page!!! It is just
empty.
I must be doing something really daft, so if someone can spot
a mistake in my strategy here, that would be much appreciated.
dmlockeThis seems sort of pointless to ask, but just in case??? You
say:
"I have highlighted the field (in index.php)" Do you mean
"textfield?" Anyways, I would think that you'd want to use a
dynamically populated menu which then pins the newsID using a URL
parameter or session variable. Anyways, what I'm getting at is: You
have somehow included the newsID chosen on index.php in the
information that's sent to the detail page request and then used
that to filter the SQL query that you already said work when you
PERSONALLY designate a value, right?
Good luck! Hopefully my query, will help you with your
query! -
Hi there,
DW CS3, PHP mySQL DB.
I have a:
Search Page: Works!
Results Page: Works!
Details Page: Does not display any data!
For some reason my Details page displays nothing. I have the
"Goto
Details Page for PHP" server behaviour" from
http://www.dengjie.com/
I have other details pages that work excellent but cannot get
this to
work.
My details page's SQL looks like this:
SELECT *
FROM test
WHERE p_ID = colname
Name: colname
Type: numeric
Default Value: -1
Run-time Value: $_GET['p_ID']
The fields I want to display are binded with the
corresponding fields of
the DB.
Please help me out.
Regards,
DeonHi there,
DW CS3, PHP mySQL DB.
I have a:
Search Page: Works!
Results Page: Works!
Details Page: Does not display any data!
For some reason my Details page displays nothing. I have the
"Goto
Details Page for PHP" server behaviour" from
http://www.dengjie.com/
I have other details pages that work excellent but cannot get
this to
work.
My details page's SQL looks like this:
SELECT *
FROM test
WHERE p_ID = colname
Name: colname
Type: numeric
Default Value: -1
Run-time Value: $_GET['p_ID']
The fields I want to display are binded with the
corresponding fields of
the DB.
Please help me out.
Regards,
Deon -
Is there a extensions for master and details pages?
I want to know if there is an extension for the master page and detail page for Cs4. I want to display the master page and have separate details pages. I am using PHP. I haven't anything on PHP but I have for ASP. Can any one help me?
www.webassist.com if you don't mind spending a few pennies.
-
Error when the link is clicked for detail page
Hello I am creating pages using MySql and PHP with dream weaver. I created my master record set and detail page. the master record set works b but when you click the link to bring up the details page I get this error
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'name = 'Brandon' LIMIT 0, 10' at line 1"
Any help with guidance on trouble shooting error would be greatly appreciated.
David=====================================================Master page=============================================================
<?php require_once('Connections/Onantional.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;
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_Onantional, $Onantional);
$query_Recordset1 = "SELECT * FROM Roster";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $Onantional) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);
?><!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>Untitled Document</title>
</head>
<body>
<table border="1" align="center">
<tr>
<td>First name</td>
<td>Last Name</td>
<td>Conference</td>
<td>email</td>
</tr>
<?php do { ?>
<tr>
<td><a href="details.php?recordID=<?php echo $row_Recordset1['First name']; ?>"> <?php echo $row_Recordset1['First name']; ?> </a> </td>
<td><?php echo $row_Recordset1['Last Name']; ?> </td>
<td><?php echo $row_Recordset1['Conference']; ?> </td>
<td><?php echo $row_Recordset1['email']; ?> </td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
<br />
<table border="0">
<tr>
<td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>">First</a>
<?php } // Show if not first page ?>
</td>
<td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>">Previous</a>
<?php } // Show if not first page ?>
</td>
<td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>">Next</a>
<?php } // Show if not last page ?>
</td>
<td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>">Last</a>
<?php } // Show if not last page ?>
</td>
</tr>
</table>
Records <?php echo ($startRow_Recordset1 + 1) ?> to <?php echo min($startRow_Recordset1 + $maxRows_Recordset1, $totalRows_Recordset1) ?> of <?php echo $totalRows_Recordset1 ?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
=====================================================end master ========================================================
========================================================details page=========================================================
<?php require_once('Connections/Onantional.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;
$maxRows_DetailRS1 = 10;
$pageNum_DetailRS1 = 0;
if (isset($_GET['pageNum_DetailRS1'])) {
$pageNum_DetailRS1 = $_GET['pageNum_DetailRS1'];
$startRow_DetailRS1 = $pageNum_DetailRS1 * $maxRows_DetailRS1;
$colname_DetailRS1 = "-1";
if (isset($_GET['recordID'])) {
$colname_DetailRS1 = $_GET['recordID'];
mysql_select_db($database_Onantional, $Onantional);
$query_DetailRS1 = sprintf("SELECT * FROM Roster WHERE First name = %s", GetSQLValueString($colname_DetailRS1, "text"));
$query_limit_DetailRS1 = sprintf("%s LIMIT %d, %d", $query_DetailRS1, $startRow_DetailRS1, $maxRows_DetailRS1);
$DetailRS1 = mysql_query($query_limit_DetailRS1, $Onantional) or die(mysql_error());
$row_DetailRS1 = mysql_fetch_assoc($DetailRS1);
if (isset($_GET['totalRows_DetailRS1'])) {
$totalRows_DetailRS1 = $_GET['totalRows_DetailRS1'];
} else {
$all_DetailRS1 = mysql_query($query_DetailRS1);
$totalRows_DetailRS1 = mysql_num_rows($all_DetailRS1);
$totalPages_DetailRS1 = ceil($totalRows_DetailRS1/$maxRows_DetailRS1)-1;
?><!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>Untitled Document</title>
</head>
<body>
<table border="1" align="center">
<tr>
<td>First name</td>
<td><?php echo $row_DetailRS1['First name']; ?> </td>
</tr>
<tr>
<td>Last Name</td>
<td><?php echo $row_DetailRS1['Last Name']; ?> </td>
</tr>
<tr>
<td>Conference</td>
<td><?php echo $row_DetailRS1['Conference']; ?> </td>
</tr>
<tr>
<td>email</td>
<td><?php echo $row_DetailRS1['email']; ?> </td>
</tr>
</table>
</body>
</html><?php
mysql_free_result($DetailRS1);
?> -
I have the letters A to Z in a master page and would like to
link to a
detail page, where all companies are displayed whose names
begin with A,
or B depending which letter the user has clicked.
On the detail page (compdetail.php) I have that code:
$query_rsCompanies = sprintf("SELECT id, name FROM
tblcompanies WHERE
name LIKE %s", GetSQLValueString($colname_rsCompanies . "%",
"text"));
But how do I link from the master page to that detail page?
I have as example for the letter "p" <a
href="compdetail.php?name=colname">p</a>, but that
doesn't work - I
fear, the link is ridiculous, sorry :(
Could someone point me the right way?
Thank you
LeoOn 13 May 2008 in macromedia.dreamweaver.appdev, Leolux
wrote:
> I have the letters A to Z in a master page and would
like to link to
> a detail page, where all companies are displayed whose
names begin
> with A, or B depending which letter the user has
clicked.
>
> On the detail page (compdetail.php) I have that code:
> $query_rsCompanies = sprintf("SELECT id, name FROM
tblcompanies
> WHERE name LIKE %s",
GetSQLValueString($colname_rsCompanies . "%",
> "text"));
>
> But how do I link from the master page to that detail
page?
> I have as example for the letter "p" <a
> href="compdetail.php?name=colname">p</a>, but
that doesn't work - I
> fear, the link is ridiculous, sorry :(
>
> Could someone point me the right way?
Since you're using PHP, I'll assume MySQL.
The link winds up looking like:
<a href="compdetail.php?name=p">p</a>
Then the SQL winds up looking like:
SELECT id, name FROM tblcompanies WHERE LEFT(name,1) = asdf
ORDER BY
name ASC
You'll use the Advanced screen in the recordset definition.
In the
parameter box, you'll add asdf; default value is A and
runtime value is
$_GET['name']
You can even generate a dataset for the master page with the
first
initials of all the companies:
SELECT DISTINCT LEFT(name) AS initial FROM tblcompanies ORDER
BY
initial ASC
Joe Makowiec
http://makowiec.net/
Email:
http://makowiec.net/contact.php -
Why is my detail page blank with no data from master page?
Hello,
I created master page that links to detail page - but when I click on the link I see the detail page empty from data.
Do you know why? Thanks!
This is the PHP code I'm using in the detail page:
<?php require_once('../Connections/connection1.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $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;
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "formUpdateSale")) {
$updateSQL = sprintf("UPDATE neve_sale SET type=%s, area=%s, address=%s, built=%s, lot=%s, BR=%s, floor=%s, floorAll=%s, parking=%s, elevator=%s, price=%s, available=%s, `date`=%s, status=%s, details=%s, myDetails=%s, pic1=%s, pic2=%s, pic3=%s, pic4=%s, pic5=%s WHERE `primary`=%s",
GetSQLValueString($_POST['type'], "text"),
GetSQLValueString($_POST['area'], "text"),
GetSQLValueString($_POST['address'], "text"),
GetSQLValueString($_POST['built'], "int"),
GetSQLValueString($_POST['lot'], "int"),
GetSQLValueString($_POST['BR'], "int"),
GetSQLValueString($_POST['floor'], "int"),
GetSQLValueString($_POST['floorAll'], "int"),
GetSQLValueString($_POST['parking'], "text"),
GetSQLValueString($_POST['elevator'], "text"),
GetSQLValueString($_POST['price'], "int"),
GetSQLValueString($_POST['available'], "text"),
GetSQLValueString($_POST['date'], "date"),
GetSQLValueString($_POST['status'], "text"),
GetSQLValueString($_POST['details'], "text"),
GetSQLValueString($_POST['myDetails'], "text"),
GetSQLValueString($_POST['pic1'], "text"),
GetSQLValueString($_POST['pic2'], "text"),
GetSQLValueString($_POST['pic3'], "text"),
GetSQLValueString($_POST['pic4'], "text"),
GetSQLValueString($_POST['pic5'], "text"),
GetSQLValueString($_POST['primary'], "int"));
mysql_select_db($database_connection1, $connection1);
$Result1 = mysql_query($updateSQL, $connection1) or die(mysql_error());
$updateGoTo = "admin-sales1.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $updateGoTo));
$colname_Recordset1 = "-1";
if (isset($_GET['primary'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['primary'] : addslashes($_GET['primary']);
mysql_select_db($database_connection1, $connection1);
$query_Recordset1 = sprintf("SELECT * FROM neve_sale WHERE `primary` = %s", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $connection1) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>11) opened iPhoto library package and I now have 'old masters' and 'Masters'
12) several years seem to be missing from these two folders
You got bitten by a nasty bug.
The upgrade of your library got interrupted, and some of your photos are still in the "Old ..." folders. There is no known fix for this, that can save your iPhoto library. We are still waiting for a bug fix from Apple. What you can do, copy out your original photos, that are still in the "Old Masters" and "Masters", and save these folders.
Then restore your library from your most recent backup and use the saved "Old " folders to reimport and add the newest photos, that are missing in your backup.
The "years" folders in "Masters" and "Old Masters" are the years, when the photos have been imported, not necessarily the years when the photos have been taken. -
Dynamic image gallery on detail page
I have a master page listing 8 products. I have inserted a dynamic image gallery on the detail page which looks ok, but has one major flaw: when you click on a thumbnail the main image opens on the wrong page. e.g. if you click on page ../dragons.php?id=3 the main image opens on ../dragons.php/id=1 and shows the following url: .../dragons.php?image=btf.jpg (or whatever the image file name).
I have only just started using php and I would appreciate some guidance on how to resolve this problem.
The relevant sections of the code are as follows?
$vardragon_dragons_species = "1";
if (isset($_GET['id'])) {
$vardragon_dragons_species = $_GET['id'];
mysql_select_db($database_cjwebsite, $cjwebsite);
$query_dragons_species = sprintf("SELECT dragons.Order, dragons.family, dragons.Latin, dragons.English, dragons.Img1, dragons.Img2, dragons.Img3, dragons.img4, dragons.Img5, dragons.text, `dragons gallery`.filename, `dragons gallery`.caption, dragons.id, `dragons gallery`.image_id, dragons.id FROM dragons, `dragons gallery` WHERE dragons.id = `dragons gallery`.image_id AND dragons.id=%s", GetSQLValueString($vardragon_dragons_species, "int"));
$dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
$row_dragons_species = mysql_fetch_assoc($dragons_species);
$totalRows_dragons_species = mysql_num_rows($dragons_species);
if (isset($_GET['image'])) {
$mainImage = $_GET['image'];
else {
$mainImage = $row_dragons_species['filename']; }
<body>
<div class="main_image"><img src="../images/dragons/<?php echo $mainImage; ?>" alt="<?php echo $row_dragons_species['caption']; ?>" />
<div class="capt"><?php echo $row_dragons_species['caption']; ?></div>
<ul class="gallery">
<?php do {
if ($row_dragons_species['filename'] == $mainImage) {
$row_dragons_species['caption'];
}?>
<li><a href="<?php echo $_SERVER['PHP_SELF'];?>?image=<?php echo $row_dragons_species['filename']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['filename']; ?>" alt="<?php echo $row_dragons_species['caption']; ?>" /></a></li>
<?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?>
</ul>
Many thanks
CJI'm still at an early stage in building this site and because it is allvery experimental I am and just using local testing.
So to try to explain my objective. I have a master page with 8 products there is a link to a detail page based on product id. So from the master page (dragons.php) you can select a product which will show the product information on a detail page (eg. dragons_species.php?id=1 or dragons_species.php?id=2 etc). This works ok.
Each detail page has various pieces of information and 5 images. I wanted to show the images in an image gallery format and so used the code you provide in your book PHP Solutions (Creating a Dynamic Online Gallery pp.323-330). This works ok on the first page where id=1, but on subsequent pages (id=2, id=3 etc) I am loosing the id link infavour of an image based link.
This is the complete script for my detail page (dragons_species.php)
<?php require_once('../Connections/cjwebsite.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$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;
$vardragon_dragons_species = "1";
if (isset($_GET['id'])) {
$vardragon_dragons_species = $_GET['id'];
mysql_select_db($database_cjwebsite, $cjwebsite);
$query_dragons_species = sprintf("SELECT dragons.Order, dragons.family, dragons.Latin, dragons.English, dragons.Img1, dragons.Img2, dragons.Img3, dragons.img4, dragons.Img5, dragons.text, `dragons gallery`.filename, `dragons gallery`.caption, dragons.id, `dragons gallery`.image_id, dragons.id FROM dragons, `dragons gallery` WHERE dragons.id = `dragons gallery`.image_id AND dragons.id=%s", GetSQLValueString($vardragon_dragons_species, "int"));
$dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
$row_dragons_species = mysql_fetch_assoc($dragons_species);
$totalRows_dragons_species = mysql_num_rows($dragons_species);
if (isset($_GET['image'])) {
$mainImage = $_GET['image'];
else {
$mainImage = $row_dragons_species['filename']; }
?>
<!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>Odonata Species</title>
<link href="../Css/dragons.css" rel="stylesheet" type="text/css" />
<link href="../Css/menu.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<?php include('../Includes/logo2.inc.php'); ?>
</div>
<div id="content"> <div id="title">
<h1>Damselflies & Dragonflies</h1>
</div>
<div class="family")><?php echo $row_dragons_species['Order']; ?></div>
<div class="subfamily">
<?php echo $row_dragons_species['family']; ?>
<div class="main_image"><img src="../images/dragons/<?php echo $mainImage; ?>" alt="<?php echo $row_dragons_species['caption']; ?>" />
<div class="capt"><?php echo $row_dragons_species['caption']; ?></div></div></
<div class="description">
<div class="text" id="name"><?php echo $row_dragons_species['Latin']; ?></div>
<div id="vernname"><?php echo $row_dragons_species['English']; ?></div>
<?php echo $row_dragons_species['text']; ?></div>
<ul class="gallery">
<?php do {
if ($row_dragons_species['filename'] == $mainImage) {
$row_dragons_species['caption'];
}?>
<li><a href="<?php echo $_SERVER['PHP_SELF'];?>?image=<?php echo $row_dragons_species['filename']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['filename']; ?>" alt="<?php echo $row_dragons_species['caption']; ?>" /></a></li>
<?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?>
</ul>
<div id="footer">
<?php include('../includes/footer.inc.php'); ?>
</div></div>
</div>
</body>
</html>
<?php
mysql_free_result($dragons_species);
?>
The code for my master page dragons.php is as follows
<?php require_once('../Connections/cjwebsite.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$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;
mysql_select_db($database_cjwebsite, $cjwebsite);
$query_dragons_species = "SELECT id, Latin, English, Thumbs FROM dragons";
$dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
$row_dragons_species = mysql_fetch_assoc($dragons_species);
$totalRows_dragons_species = mysql_num_rows($dragons_species);mysql_select_db($database_cjwebsite, $cjwebsite);
?>
<!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>Odonata</title>
<link href="../Css/menu.css" rel="stylesheet" type="text/css" />
<link href="../Css/dragons.css" rel="stylesheet" type="text/css" />
<body>
<div id="header">
<?php include('../Includes/logo2.inc.php'); ?></div>
<div id="content"> <div id="title">
<h1>Damselflies</a> & Dragonflies</h1>
<div id="sidebar">
<?php include('../Includes/menu2.inc.php'); ?>
<div id="text">
<h2>ODONATA</h2>
</h2>
<p>Ten species have been recorded on the islands, of which seven are common and widely distributed. The Golden-ringed Dragonfly and the Emerald Damselfly are both very scarce, whilst the record of the Azure-winged Dragonfly on Lewis is unconfirmed.
<?php do { ?>
<div class="speciesbox"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['Thumbs']; ?>" /></a>
<div class="latin"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><?php echo $row_dragons_species['Latin']; ?></a>
<div class="english"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><?php echo $row_dragons_species['English']; ?></a> </div>
</div></div>
<?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?> </div>
<div id="footer">
<?php include('../includes/footer.inc.php'); ?>
</div>
</body>
</html>
<?php
mysql_free_result($dragons_species);
?>
Does this shed any light?
Many thanks
CJ. -
Modify Master/Detail pages
<?php require_once('Connections/pdoConnect.php'); ?>
<?php
// Issue the query
$pdo_recordset1 = $conn->query("SELECT id, title, author, subject FROM audio");
$pdo_recordset1->setFetchMode(PDO::FETCH_ASSOC);
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Audio List</title>
</head>
<body>
<?php
// Now iterate over every row and display it
$n = 0;
while($r = $pdo_recordset1->fetch(PDO::FETCH_ASSOC))
?>
<a href="PDO_detail.php?item=<?php echo $r['id']?>">
<?php echo ($r['subject'])?><?php echo ($r['title'])?><?php echo ($r['author'])?></a><br />
<?php
++$n;
if(0 == $n)
echo "Sorry there are no items to display";
?>
</body>
</html>
This is the code produced by DW Master/Detail pages for the Master page using the PDO extension. This produces a list of all entries in the database. However I want to separate out the "subject" data as a heading above each title within that subject group. Eg:
SUBJECT 1
title 1
title 2
title 3
SUBJECT 2
title 1
title 2
etc
I think this will require an array of the subjects and a nested loop for the titles, but not sure how to modify the code to achieve this - any help would be very welcome.<?php require_once('Connections/pdoConnect.php'); ?>
<?php
// Issue the query
$pdo_recordset1 = $conn->query("SELECT id, title, author, subject FROM audio");
$pdo_recordset1->setFetchMode(PDO::FETCH_ASSOC);
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Audio List</title>
</head>
<body>
<?php
// Now iterate over every row and display it
$n = 0;
while($r = $pdo_recordset1->fetch(PDO::FETCH_ASSOC))
?>
<a href="PDO_detail.php?item=<?php echo $r['id']?>">
<?php echo ($r['subject'])?><?php echo ($r['title'])?><?php echo ($r['author'])?></a><br />
<?php
++$n;
if(0 == $n)
echo "Sorry there are no items to display";
?>
</body>
</html>
This is the code produced by DW Master/Detail pages for the Master page using the PDO extension. This produces a list of all entries in the database. However I want to separate out the "subject" data as a heading above each title within that subject group. Eg:
SUBJECT 1
title 1
title 2
title 3
SUBJECT 2
title 1
title 2
etc
I think this will require an array of the subjects and a nested loop for the titles, but not sure how to modify the code to achieve this - any help would be very welcome. -
How to add a button on detail page
Hey
I know it is not standard function to add a button on detail page, but I would like to know if we can use javascripts to add a button on the detail page. for instances add it behind "Edit" button?
Thanks for your input.Hi,
Yes you can add a custom button through JavaScript. Below is the link of the document for adding or deleting a button.
http://www.box.net/shared/3brq569ybg
Thanks & Regards
Sablok -
Call the document Approval Workflow screen from a custom KM Details Page
Hi,
We are trying to call the Approval Workflow screen from a custom developed KM Details page (using JSPDynpage). How can this event be triggered. We want to trigger the same event that gets called when a user clicks on the Approval Option under Settings in the Details page for a KM resource. Quick response would be much appreciated.
Thanks and Regards,
ShibendraHi,
Refer below links:
https://blogs.oracle.com/prajkumar/entry/call_oaf_page_from_d2k
http://oraclearea51.com/11i-oa-framework/17-technical-articles/technical-articles/325-how-to-call-oaf-page-from-form-personalization.html
http://oracle.anilpassi.com/call-oa-framework-page-from-oracle-forms-passing-parameters-2.html
--Sushant -
New youtube videos detail page
Last time I generated my app I found the new detail page for youtube videos, with the WP 8.1 player.
Seems cool, but it have many many problems:
- The layout is different from the rest of the app (small letters in title and description, icon and name of the app
leaning to top, etc) - screenshot 1
- There is a lot of black space under the video - screenshot 1
- The fullscreen is buggy - screenshot 2
- New landscape view show a sidebar with all the buttons, the buttons we haven't turned on in the App Studio don't work - screenshot 3
(Please see screenshots: http://1drv.ms/1l0HFe3)
What's up? The old player was fine! Now I won't update my app to Store just because of this. Please fix this soon.
Waiting for your quick reply,
Best regards
PS. Please help me too with another issue related to App Studio:
http://social.msdn.microsoft.com/Forums/wpapps/en-US/e4dddd27-2f5c-4006-a05f-a119b28a4929/accented-characters-and-characters-between-quot-quot-in-a-rss-feed-list?forum=wpappstudio Thank you so much!
brod56
Edit: The new page works very well on Windows 8 but, as I said, it doens't happen in WP. Please fix in WP and answer me!I think they had to change it because of Youtube integration, they need to respect Youtube policies.
Why did you mark this as answer, App Studio Team? This is not the answer! Of that I know.
I'm not asking for the return of the old model, I understand the Youtube policies.
I'm asking, yes, for a fix for the design bugs in the new model when showed in a WP (why did you forget WP?).
Don't try to escape from the question, please. Please answer me directly in this post.
Best regards.
PS. You can see again my real problem:
"- The layout is different from the rest of the app (small letters in title and description, icon and name of the app
leaning to top, etc) - screenshot 1
- There is a lot of black space under the video - screenshot 1
- The fullscreen is buggy - screenshot 2
- New landscape view show a sidebar with all the buttons, the buttons we haven't turned on in the App Studio don't work - screenshot 3
(Please see screenshots: http://1drv.ms/1l0HFe3)"
brod56 -
I have a workflow being deployed for the first time on a farm. When I create a project with an EPT connected to the workflow it runs and can enter the required field in a PDP. Then I Submit the workflow to go to the next stage and I get the "Unable
to open project, no valid Project Detail Page could be found for the project" error. After that the project is stuck on the same error. All of the 18 stages have PDP and Schedules assigned to them.
Any ideas on why the workflow cannot see the PDPs? Is there a farm permissions that I am missing? Thanks!Hi David,
It starts to be a bit technical for me, but here is what I found on the web (seems to be an authentication issue with Sharepoint 2010):
http://social.technet.microsoft.com/Forums/en-US/120ab535-63d2-4205-a51f-1987e9c0cf79/sharepoint-fba-the-content-type-texthtml-charsetutf8-of-the-response-message-does-not-match-the
http://social.msdn.microsoft.com/Forums/silverlight/en-US/5cc70ff6-50d9-4cd3-b092-12007f4e495b/response-message-contenttypebindingtype-mismatch
http://stackoverflow.com/questions/5263150/the-content-type-text-html-charset-utf-8-of-the-response-message-does-not-match
Hope it will help you going forward in resolving your issue.
Guillaume Rouyre - MBA, MCP, MCTS
Maybe you are looking for
-
Curve 8310 Calendar will not Sync at all
The calendar of my curve 8310 will no longer sync though I've had no problem before. I have Outlook 2002 and Desktop Software 4.6 and sync using the USB cable for wired synchronization. When the DS progress windows display during sync the sections
-
How to Exclude a sub directorys from polling using FileAdapter of BPEL Proc
Hi all, I have a BPEL process with file adapter which is polling to root folder . I want to exclude File polling for some of the sub folder of the BPEL process. How to exclude file polling for sub folder i know the option is available for file name n
-
can not open saved files on my desktop with new reader
-
Airradar reports WPA2(WEP) and I can find how to change this?
While scanning my surroundings recently with airradar I noticed that it reports my 5GHz network as using the protocol WPA2 but the encryption type of WEP. I am using a dual band airport extreme that I purchased in January. I have looked on both the "
-
im having a problem installing adobe air its telling me i may not have admin rights even though i do can anyone help me?