PC power supply dies after a second

I had this weird issue while I was assembling a PC with parts from Newegg I got for $50 ($15 motherboard,$20 sempron processor from ebay etc.). The machine worked fine when I tested it without mounting the motherboard into the case. But after loading into the tower, when I hit the power button on the case, it power supply started for a second and went down again. Turns out the ATX cable and the 12v cables did not make firm contacts with the mother board. Pushing them firmly in fixed the problem.