Moving a servo via serial in conjunction with web server and momentary button

I've got a few questions regarding the feasibility of controlling a servo over the web using serial communication in conjunction with a momentary push button.

If the data comes in over the serial port, the fact that the PC got the data from a web client is completely immaterial.

Finally, I want to be able to push the momentary button to either lock the door if it's currently unlocked, or lock the door if it's currently locked.

You want to lock the door if it is unlocked or locked? Why does the current state matter, then? Push the switch; the door locks.

So far I have been able to lock and unlock the door over the web.

No. you've been able to lock and unlock over the serial port. There is no web involvement, as far as the Arduino is concerned.

Problem:

I can control the servo either using the web interface or the push button, not both. I can't seem to properly execute my code so that the button and the web buttons work. I've looked all over for a similar project online as a reference, but I can't seem to find anything.

I wouldn't expect to find something similar, either. This would be trivial to debug using the Serial Monitor.

       Serial.flush();

I got this far. You'll need to explain why you are using this before I go any farther.