# Dynamic select list selected item

**URL:** <https://forum.kirupa.com/t/dynamic-select-list-selected-item/324239>\
**Category:** Uncategorized\
**Created:** [August 10, 2011, 2:25am UTC](https://forum.kirupa.com/t/dynamic-select-list-selected-item/324239 "2011-08-10T02:25:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakepeg](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@jakepeg](https://forum.kirupa.com/u/jakepeg)\
**Post date:** [August 10, 2011, 2:25am UTC](https://forum.kirupa.com/t/dynamic-select-list-selected-item/324239/1 "2011-08-10T02:25:26Z")

</div>

I have an order form page with quite a few select lists (about 40), all of them hold values from 0 - 20.

They are basically on an order form, for ordering prints from an uploaded image.  
There are 40 product options (sizes and materials), and by each product is a select box for the quantity 0 - 20.

I want the user to be able to select the number of prints for an image and choose the products they require.

Clicking the submit button will insert their choices into a mySQL db.

Here is the form…

[http://www.tiberi.com.au/orders/order\_popup.html](http://www.tiberi.com.au/orders/order_popup.html)

Now, what I need to know is how best to dynamically make the options selected from the data in the database if the user comes back to this order page?

I hope this makes sense! I’m a newbie when it comes to php!
