[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 345
  • Last Modified:

Dynamic list menu options only displaying top product

Hi there,
I have created a product page where you click on the category and then only those products show up in the drop down list on the page, HOWEVER only the first product is showing up in the dropdown.  Attached is code.  Any help really appreciated.
MsKazza

 products.php
0
Karen Liddy
Asked:
Karen Liddy
  • 3
  • 2
2 Solutions
 
Jason C. LevineNo oneCommented:
Hi MsKazza,

The code looks correct.  Can I get a URL to test?  If not, can you paste a sample URL so I can check the query string?
0
 
Karen LiddyOffice ManagerAuthor Commented:
Hi Jason,

thanks for response.  site not live yet so sample url is : http://localhost/agraphics/products.php?recordID=5

Hope this is what you were looking for.
Link on menu.php is : <a href="products.php?recordID=<?php echo $row_sections['sectionID']; ?>"><?php echo $row_sections['sectionName']; ?></a>

Thanks,

MsKazza
0
 
Jason C. LevineNo oneCommented:
products.php?recordID

That's correct, too.  Weird.

Try removing the Dynamic List/Menu behavior and re-applying it.
0
 
Karen LiddyOffice ManagerAuthor Commented:
   <option value="<?php echo $row_products['pID']?>"<?php if (!(strcmp($row_products['pID'], "recordID"))) {echo "selected=\"selected\"";} ?>><?php echo $row_products['pName']?></option>
    <?php
} while ($row_products = mysql_fetch_assoc($products));
  $rows = mysql_num_rows($products);
  if($rows > 0) {
      mysql_data_seek($products, 0);
        $row_products = mysql_fetch_assoc($products);
  }


Thanks for the help Jason, this is what finally did it.
:) been driving me nuts for ages, now i finally got it.

MsKazza
0
 
Karen LiddyOffice ManagerAuthor Commented:
Although Jason spent the time to look over my code, which I really appreciated, it was myself in the end that actually managed to solve the problem.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now