13 Replies Latest reply on Oct 17, 2011 11:46 PM by anshekerman

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



      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 ,over 5 times nowe, 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 34


      But I don't understand what could be wrong in this line.

      Here is the code lines 33 -48: is is about the second line:


      $varProduct_rsDetails = "32";
      if (isset($_GET[‘productID’])) {
        $varProduct_rsDetails = $_GET[‘productID’];
      mysql_select_db($database_connCosmo, $connCosmo);
      $query_rsDetails = sprintf("SELECT products.productID, products.productName, products.price, products.`description`, products.inventory, products.image, vendors.vendorName FROM products, vendors WHERE products.vendorID = vendors.vendorID AND products.productID = %s ", GetSQLValueString($varProduct_rsDetails, "int"));
      $rsDetails = mysql_query($query_rsDetails, $connCosmo) or die(mysql_error());
      $row_rsDetails = mysql_fetch_assoc($rsDetails);
      $totalRows_rsDetails = mysql_num_rows($rsDetails);

      mysql_select_db($database_connCosmo, $connCosmo);
      $query_rsCategories = "SELECT * FROM categories ORDER BY categoryName ASC";
      $rsCategories = mysql_query($query_rsCategories, $connCosmo) or die(mysql_error());
      $row_rsCategories = mysql_fetch_assoc($rsCategories);
      $totalRows_rsCategories = mysql_num_rows($rsCategories);


      Can someone tell me what is going on here?


      Kind regards, Ans Hekerman