2
Example: In a form, some fields (input
) are loaded via ajax from a select
. To option
selected will be used in the back-end for validation of those fields.
However, the user can load a certain option, fill in their fields and intentionally change the value (in the browser) of the tag option
selected for another valid value, for example, and forward to the server.
How to ensure consistency of data coming from an HTML form? What techniques/methods are essential?
I understand that this can be handled under certain conditions in the back-end. My search is for what best practices are. For example, I think for each
option
, I must store an identifier token in ainput[type=hidden]
, so you could easily check if the data is related to the selected option.
Forget it, there’s nothing to guarantee data on the client http://answall.com/q/13298/101, http://answall.com/q/67911/101
– Maniero
It is not clear to me what information you want to guarantee. Your methodology also does not speak if you want to treat bots attacks on the form. Better describe the data flow between get and post. What would this Option be and when is it selected? Is a parameter visible to the user or is an internal system control variable?
– Intruso