Find: if ($s!=$session['dbsessionhash']) { Replace with: if ($s!=$session['dbsessionhash'] && $reasonentered!=1) {