![]() |
|||
PHP
IT Tags
PHP and FLash multiple file uplo SimpleXML Combo box associative arrays indexing solr objects Mobile site connection to MYSQL include XHTML control panel Simplexml Parser Solr XML server shutdown Xampp Stop Script my_thread_global_end Remove Duplicate photo gallery local server local server sdf ajax magento ecommerce php mail Overlapping Layers mysql server check domain UPDATE |
Need help with combo
By: rekha singh | 13 Mar 2010 12:57 pm
I am trying to figure out how to get two columns into one combo. I have two columns. One column for first name and other columns for last name. I want first and last name in one combo. Here is my codes. Can someone tell me what went wrong?
CommentsIs your code erroring out? You can do it way simpler:
By: rekha singh | 13 Mar 2010
It would be helpful if you said what sort of error/problem you had, but I think you need quotes around the parameters in $row, so:
By: rekha singh | 13 Mar 2010
I tried that and it did not work. There is no error msg but when I look at combo and click on it. It has many 0's and there is no first or last name.
By: rekha singh | 13 Mar 2010
Pl. try like this:
By: rekha singh | 13 Mar 2010
Well, at first glance it looks like you are using the wrong operator for concatenation.
By: rekha singh | 13 Mar 2010
Thank you and now it is working. Next thing I need to get more information from table into fill out text box. I do not know much about combo. When we select the item from combo, can it bring inforamation from table into text boes? Or do we need a button to get information from tables into text boxes? I am create a form to get information from table into different text box for update if needs. I will use UPDATE SET. I am still learning how to do that. I do know how to update on mysql but not on PHP.
By: rekha singh | 13 Mar 2010
With a little javacript goodness, you can chain select boxes. Essentially when the first 'select' is chosen, you can have an ajax call to your php script, have it grab the contents for the next box, and inject it. With jQuery this can be accomplished with very little code. There should be some great examples online.
By: rekha singh | 13 Mar 2010
|
