The P45 won't be a problem. They're obliged to provide one, irrespective of the circumstances of your leaving. (Even if they don't, you can still complete a P46 instead).
As PK states, you probably won't be able to get a reference from them (which could turn out to be a problem if, for some reason, you leave your new job after only a short while).
Legally, you'll be in breach of your contract and your former employer will be able to pursue you (through the courts if necessary) for any losses which result through your early departure. If you work in the City, and your firm loses a multi-million pound contract because you leave early, they can demand that you repay the losses. However, most firms won't suffer any major losses because an employee walks out. They could still, however, force you to pay the additional costs of paying their staff overtime, or engaging an agency employee, to do the job which you should have been doing.
Chris