if ($_POST['do'] == 'updatethread') { // blah blah if ($threaddeleted != 1) { // see how datamanager and title are handled here } // blah blah }