smonkcaptain Posted June 26, 2010 Share Posted June 26, 2010 Hello all, I'm currently making an upload form for a photography website, in which i want to include a 'Camera Body' and 'Lens' field to be displayed next to the uploaded image. I've made the form, and would like to be able to get the 'camera body' and 'lens' data from the 'members' mysql database into a drop down list on the form. Obviously, this data would change dependent on which member was logged into the site. I hope you can help me and if you require any more information, just ask. Thanks! Jimmy Leaman Quote Link to comment https://forums.phpfreaks.com/topic/205902-getting-data-from-mysql-into-drop-down-menu/ Share on other sites More sharing options...
murdocsvan Posted June 26, 2010 Share Posted June 26, 2010 I think this is too complex a solution to post on a forum, but i'll break the logic down how i see it: 1. In the member database create too columns, for lens and for camera body 2. Create a form for members to register their different types of camera body and lens 2.1. On submission, store the registered items in arrays 2.2. Commit array of items to database by using the serialize() function 3. When member uploads photograph, use unserialize() function to make the array readable again 4. Use the foreach() function to create a new list item for each camera body and lens stored in the array Honestly i wouldn't consider making a solution like this for someone without getting paid Hope what i said helps anyway. Quote Link to comment https://forums.phpfreaks.com/topic/205902-getting-data-from-mysql-into-drop-down-menu/#findComment-1077471 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.