Solved

Dynamic list menu options only displaying top product

Posted on 2010-11-30
5
333 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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…

739 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