Is it a good practice to store primary key values in form elements for storing data after form submission?
For example if I have a select
tag inside my form
like this:
<select name="city">
<option value="3">Kolkata</option>
<option value="7">Bangalore</option>
<option value="1">Delhi</option>
<option value="4">Mumbai</option>
</select>
In my City table they are stored like this:
Id Name
-- ----
1 Delhi
3 Kolkata
4 Mumbai
7 Bangalore
After form submission, extraction of values is pretty simple and we directly get the foreign key value without looking up the City table.
However, I feel that this could be a major problem since one can easily manipulate the values through developer tools.
If not this approach, what is the general and widely accepted norm?
EDIT
Since this question has been suggested as a duplicate of this, I've added my reason against it:
This question deals with the aspect of general practice followed by developers unlike the other with deals with security concerns if a particular practice is followed.