Solved

Dynamic list menu options only displaying top product

Posted on 2010-11-30
5
313 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Amazon Redshift 2 25
is this a cms? 8 34
Zoom the page when you go in from your phone 3 10
How can I increase the size of this logo 5 16
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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 …
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now