Skip navigation
Currently Being Moderated

Tutorial Dreamweaver Cs5.5 The Missing Manual (Pg 998 - 1018) about adding dynamic data to your page

Oct 11, 2011 6:15 AM

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, 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

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points