如何保护输入类型值不被检查元素编辑?

How to protect input type values from edit with inspect element?

这是我的代码,我想保护 data-price 不被编辑

$platinum=65;

这是在 while 循环中

echo '<li class = "pink"
           id = "pink"
           data-price = "' . $platinum.'"
           title = "Row' . $Seats . '"
           name = "' . $RowName . '"
           value = "' . $Seats . '"></li>';

你可以通过prepare语句获取价格,然后存储到隐藏输入中..这是安全的方法 $白金=65;从数据库中获取此值