designing a variable gain amplifier
Don't bother using MOSFETs. Instead, use FET-based devices such as the CD4066.

Furthermore, if you only need 2 gain settings, you only need 1 switch. As an example







simulate this circuit &ndash; Schematic created using CircuitLab

will give a gain of 10 or 100. (Note that your example, if it worked, would give gains of 11 or 101). Also note that, whenever possible, put your switch elements to ground rather than floating, since that way the gate voltages will not vary with signal.