When the pedal goes to the floor, the master cylinder has failed. Check the fluid level, then have a certified mechanic test it. Rebuild or replace the master cylinder before driving, as your safety depends on good brakes.