PDA

View Full Version : Tutorial Dreamweaver Cs5.5 The Missing Manual (Pg 998-1018)


anshekerman
10-11-2011, 01:44 PM
Hallo,
I did Tutorial: Displaying Database Info in the Missing Manual for Dreamweaver CS5.5.
My problem is with "Editing a Recordset and Linking to a Detail Page" (which starts at pg 1002:
I did this exercise about 3 times, but every time with "Building the Detailed Product Page" at pg 1007, I get a bad result.
I only get one page (the default one with productID = 1) for every link on the indexpage.

In the adressbar (Live View) I see the right adress: for example: http://localhost/cos...hp?productID=16 (http://localhost/cosmo_shop/product.php?productID=16), but for all productID's only the detailspage for productID are shown.

There is also a message: Notice: Use of undefined constant ‘productID’ - assumed '‘productID’' in E:\xampp\htdocs\cosmo_shop\product.php on line 35 and: Notice: Use of undefined constant ‘productID’ - assumed '‘productID’' in E:\xampp\htdocs\cosmo_shop\product.php on line 43.
But I don't understand what is wrong on line 35 or 43:
here are the lines 34 to45:

$currentPage = $_SERVER["PHP_SELF"];

$maxRows_rsProducts = 12;
$pageNum_rsProducts = 0;
if (isset($_GET['pageNum_rsProducts'])) {
$pageNum_rsProducts = $_GET['pageNum_rsProducts'];
}
$startRow_rsProducts = $pageNum_rsProducts * $maxRows_rsProducts;

mysql_select_db($database_connCosmo, $connCosmo);
$query_rsProducts = "SELECT productID, productName, price, inventory FROM products ORDER BY productName ASC";

Does someone know something to say about this problem?
I hope this is a right forum for this question. If not, can someone maybe tell me where to find a better forum/place?

King regards, Ans Hekerman

edbr
10-12-2011, 02:24 AM
moved this to the php forum. can you post the complete script? might be clearer