# Dropdown Problem

**URL:** <https://forum.kirupa.com/t/dropdown-problem/261418>\
**Category:** programming\
**Created:** [May 27, 2008, 2:07pm UTC](https://forum.kirupa.com/t/dropdown-problem/261418 "2008-05-27T14:07:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stedem](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@stedem](https://forum.kirupa.com/u/stedem)\
**Post date:** [May 27, 2008, 2:07pm UTC](https://forum.kirupa.com/t/dropdown-problem/261418/1 "2008-05-27T14:07:52Z")

</div>

Hello

I’m busy creating a small cms for my personal site. In the cms i have a dropdown list with some options in but I want this list to auto update instead of hardcoded.

I have 2 problems

Problem 1:  
How can I link the dropdown list to a database? For example if i have a table DROPDOWNVALUE with 5 values in. How can i let my dropdown list auto show these values. If i add an extra item to the table this also should appear in this list and must be selectable.

Problem 2:  
Can I have this dropdown value to auto update to the value stored in the database products. For example. I have a dropdown with the values “flowers, animals or gifts”. If I edit a product with the value “flowers” the dropdown should be automatically select “flowers” even if this is the 3th value of the dropdownlist.

Thanks!

---

<div class="post-metadata">

**Author:** ![stedem](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@stedem](https://forum.kirupa.com/u/stedem)\
**Post date:** [May 27, 2008, 5:03pm UTC](https://forum.kirupa.com/t/dropdown-problem/261418/2 "2008-05-27T17:03:20Z")

</div>

I can do some things in php and sql but this thing i didn’t figure out.  
I have a small own created webshop with small cms.

I can add , edit and delete products but the dropdown is the only thing that doesn’t works 🙂

---

<div class="post-metadata">

**Author:** ![djheru](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/djheru/32/3190_2.png) [@djheru](https://forum.kirupa.com/u/djheru)\
**Post date:** [May 27, 2008, 6:18pm UTC](https://forum.kirupa.com/t/dropdown-problem/261418/3 "2008-05-27T18:18:36Z")

</div>

what he said

---

<div class="post-metadata">

**Author:** ![djheru](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/djheru/32/3190_2.png) [@djheru](https://forum.kirupa.com/u/djheru)\
**Post date:** [May 27, 2008, 6:20pm UTC](https://forum.kirupa.com/t/dropdown-problem/261418/4 "2008-05-27T18:20:44Z")

</div>

DOH! you beat me by 7 minutes

---

<div class="post-metadata">

**Author:** ![stedem](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@stedem](https://forum.kirupa.com/u/stedem)\
**Post date:** [May 27, 2008, 6:55pm UTC](https://forum.kirupa.com/t/dropdown-problem/261418/5 "2008-05-27T18:55:31Z")

</div>

Thanks,

I’m going to try this tomorrow, first going to sleep, tomorrow early up to catch a plane  
I’ll keep you informed if i have a problem or question

---

<div class="post-metadata">

**Author:** ![joef5052881](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@joef5052881](https://forum.kirupa.com/u/joef5052881)\
**Post date:** [May 28, 2008, 1:08pm UTC](https://forum.kirupa.com/t/dropdown-problem/261418/6 "2008-05-28T13:08:54Z")

</div>

wanna to play [age of conan gold [url=http://www.igxz.com/age-of-conan-gold-s.html]aoc gold [url=http://www.igxz.com/]lotro gold [url=http://www.lotro-sale.com/age-of-conan-gold/]age of conan gold [url=http://aoc.rgtr-credit.com/]age of conan gold](http://www.igxz.com/age-of-conan-gold-s.html)??
