Create New Form Value
Posted: Thu Jan 22, 2009 8:15 pm
Hey there, php is not my strong point. I can't write my own php to save my life, but if I have a snippet I can usually figure out how to tweak it.
I have a form which autopopulates a few form fields when the user enters his/her zip code, the city and state fields are populated from a mysql db. The state field is an abbreviated version of the state. I need to create a new value from the state value using php. So if the state is AL, I need to be able to have a new value "Alabama", if the state is CA, I need a new value for "california", etc. Does anyone know how I can do this? I need both values, so it isn't that I would need to rename the value. Thanks.
I have a form which autopopulates a few form fields when the user enters his/her zip code, the city and state fields are populated from a mysql db. The state field is an abbreviated version of the state. I need to create a new value from the state value using php. So if the state is AL, I need to be able to have a new value "Alabama", if the state is CA, I need a new value for "california", etc. Does anyone know how I can do this? I need both values, so it isn't that I would need to rename the value. Thanks.