The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
PHP-General - Loading a combobox
Discuss Loading a combobox in the PHP Development forum on Dev Shed. Loading a combobox PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 25th, 2013, 08:49 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 6
Time spent in forums: 3 h 3 m 51 sec
Reputation Power: 0
|
|
|
PHP-General - Loading a combobox
New to PHP and I would like to know if you can load a combobox from mysql after the combobox has been created or do you have to load it at the time you create it.
I would like to create all of the display fields prior to loading.
Thanks.
|

January 25th, 2013, 09:24 AM
|
 |
Likely to be eaten by a grue.
|
|
Join Date: Oct 2006
Location: Pennsylvania, USA
|
|
|
...what?
You want to load things after you create them?
__________________
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
|

January 25th, 2013, 09:32 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 6
Time spent in forums: 3 h 3 m 51 sec
Reputation Power: 0
|
|
|
yes, if that is possible.
|

January 25th, 2013, 10:18 AM
|
 |
Likely to be eaten by a grue.
|
|
Join Date: Oct 2006
Location: Pennsylvania, USA
|
|
|
Load how? From where? How are you creating them?
We need a LOT more information from you, such as what you think the definitions of "load" and "create" are, as well as where the data is, how it's constructed, and when/how you want to display it to the client.
The short answer is basically: No, you can't make something before you know how to make it. But maybe you have another thing you're asking. I can't get into my car without actually walking over to my car, either.
|

January 25th, 2013, 10:54 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 6
Time spent in forums: 3 h 3 m 51 sec
Reputation Power: 0
|
|
|
Ok, let me ask it this way. How would you populate a combo box from a db and then make sure it is placed in a certain spot on the display.
Instead of posting all of the code I am trying to use I will narrow it down to displaying and populating only 1 box and nothing else, that way you can see what I am trying to do. If that would help.
|

January 25th, 2013, 11:00 AM
|
|
|
|
if you mean you want the options of combo box coming from a database then using pure php you have to get these options first and create the combo box.
|

January 25th, 2013, 02:24 PM
|
 |
Likely to be eaten by a grue.
|
|
Join Date: Oct 2006
Location: Pennsylvania, USA
|
|
|
You have to load the data from the database before printing it to the HTML document.
Its position within the web page on the screen is governed by the order you print it in, as well as the CSS you apply to it.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|