if ($_POST['rpg_name_int'] == '1') { $db->query_write("UPDATE ". TABLE_PREFIX ."thread SET rpg_name_int = '1' WHERE threadid = '" . $vbulletin->threadinfo['threadid'] ."' "); } else { // do check or something else here }