Solved

Dynamic list menu options only displaying top product

Posted on 2010-11-30
5
320 Views
Last Modified: 2012-05-10
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
Comment
Question by:Karen Liddy
  • 3
  • 2
5 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 34243773
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
 

Author Comment

by:Karen Liddy
ID: 34244030
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
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 200 total points
ID: 34244518
products.php?recordID

That's correct, too.  Weird.

Try removing the Dynamic List/Menu behavior and re-applying it.
0
 

Accepted Solution

by:
Karen Liddy earned 0 total points
ID: 34261740
   <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
 

Author Closing Comment

by:Karen Liddy
ID: 34289929
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question