I have a drop down list with various options. When the user has selected an option and hit submit the data is stored in a database column relating to that drop down. however one of the options is 'other' and if they user chooses this the drop down list disappears and a two text boxes appear for them to enter the details manually. How do I take this manually entered data and store it in the database when it's coming from two text boxes and going into one column within the database?

Recommended Answers

All 5 Replies

Look up mysql and go from there :)

Sounds like you need a conditional statement on your code just before you perform your INSERT/UPDATE SQL statement. If 'other' is selected, then use the value(s) from the text boxes.

Ok I'll add an if statement in. How do I get the data thats coming from two text boxes into one column in the database? or what way would that need to be done?

You can assign the value if the two text boxes to a variable, then reference that variable in your SQL routine.

Thank you I will try this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.