jperez260 Posted May 3, 2014 Share Posted May 3, 2014 (edited) Hello All, I have a form that has a DropDown list that is called from an SQL statement; in the SQL table it has a "name" and "email", what I want is the form to grab the "email" as a variable from a "onChange" event so when my form is posted it carries the "email" as a variable that I can use in a function. I can add the email as a hidden <input> however since I don't know how to create an onChange event to grab the "email" from the SQL instance when the drop down is selected I can't pass the email as a variable when the form is posted. I suppose this either needs to be done in Ajax or using JQuery however I'm not sure what is the best approach or way to do it. Does anyone have any spare time to educate me on this, I've never written Ajax or JQuery code before, trying to do this in php alone does not seem like a solution. Thank you in advance Edited May 3, 2014 by jperez260 Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted May 3, 2014 Share Posted May 3, 2014 did you read the last comment in your '$Post Multiple Variable from a Single <option>' thread? Quote Link to comment 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.