Hello,
I am looking for direction on developing a web form that validates user input against a list of values before submitting the form.
To be specific, I have a simple php form with a text box for an address/house number and a dropdown box with street names. My objective is to have the user supply an address and when clicking submit, the form would ideally take the values of the two fields and see if there is a matching address existing either in a database OR perhaps an XML file, etc. If the concatenated value has a match in the list, then redirect the user to a page indicating that that address is not permitted. Alternatively, if there is no match found in the list, then the data collected in the form is then passed and entered as a new record in a database. Confusing yet? lol.
I realize that there is probably some type of Javascript, etc workaround, unfortunately I know enough about programming to get myself into trouble ;). I do have a preference for utilizing PHP for the form and database coections, as it is what I am most comfortable using. As for the "list of baed address values," it is not currently in existence, so it could be created in either format to suit the needs of the script. (I also realize that as mentioned the workaround may not be PHP related, but I was not sure where else to post this thread to. Moderators please feel free to move it if there is a more appropriate forum for it.)
I have conceptualized it in my brain and I feel fairly certain that it is not overly complicated, so hopefully someone here can point me in the right direction.
Thank you for stopping by!
برچسب:
نویسنده: آیلین رضوانی
تاريخ: چهارشنبه
22 آذر
1396 ساعت: 18:28