Not knowing how you have the code stored only suggestion I can make is....
Update the field in the table to varchar
then generate your codes and store as code1:code2:code3:code4 etc...
then you can call the code from the db and use the explode function of php to make it an array and then use in_array to check the inputed code to that of the stored code...
this below is an example if you have the codes stored in single field (code1:code2:code3:code4:code5)
$code = explode(':', $r['code']);
if(in_array($_POST['code'],$code)) {
// do whatever it is when page is unlocked
} else {
// page is locked }