php - Prevent changing checkbox value -


this question has answer here:

as i've found no other answer on web, i'm asking here :

i'd find way prevent people changing checkboxes' values.

i'm using serialize() , unserialize() set , checkboxes data on database, , problem if changes value of checkbox (using chrome or firefox dev tools exemple) messes retrieved values. i'd know if possible via php.

it bit unclear ask: php can handle data on server side. if not want specific attribute of dataset read / write / database modified, don't it. no 1 forces consider data get, example inside $_post values form submission.

however checkboxes presented @ client side. there users can modify values. php not have control on that, since running on server side.

what try prevent changes checkboxes means of javascript can used on client side. works suppressing or better swallowing click events raised user. there no need that: html allows declare checkbox disabled prevents modification.

if not looking for, maybe because of optical reasons, might want overwrite value of checkboxes on html level adding hidden field holding same name , value. way irrelevant modifications users make.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -