Jump to content

Submit a different value than <select><option> displays


Recommended Posts

edit: Nevermind, I figured it out. Thanks, anyways. If there's a way to delete this thread, I will.Hi, is there a way to have a form with a <select> drop down menu that will show the user a set of values, but submit a different value based on what they select? For example:Option 1 shows "News", but the value the form submits to the database if selected is 1or Option 2 shows "Message", but submits a value of 2 to the database. The options that they would see are the values being pulled from a table called "subjects" in a column called "subject", but the value that would be submitted is the value from that same table, except I want it to submit the id for that subject.I hope I am being clear, thanks for any help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...