I allow a guest to post on my WordPress site. I disabled some fields, but I let the user select only one field.
Cool, but he can edit this field.
Example: Field: name
.
After I a开发者_如何学编程dded it, he can rename the field to name2
.
So, how do I can a disable this?
Use the readonly
attribute,
<input type="text" name="test" value="<?php echo $name ?>" readonly="readonly">
精彩评论