An immigration officer is telling you to overstay your visa? There has to be a back story there....

I suggest, if at all possible, staying in status. It's possible to adjust your status based on marriage after a lawful entry, despite an overstay, but if you're caught in the interim (or if you have to work for a living and do so without EAD) things can get very complicated very quickly.