Forgot to say that should you do this:
For these reasons I would have the port connected to +5V through a 10k resistor; and the switch would connect the port to GND (may be through 1k for protection).
You would change your code to read, "if startbutton = 0".