You need to use a crossover cable to connect a pc to a router. (Had it right the first time around.) Your problem was more likely one of mis-configuring ip address & subnet values for this very abbreviated temporary network.
Simplest way to keep this straight is to think of all devices as belonging to one of two families:
First family is devices with multiple ethernet ports that just join together other devices at layer 2. This includes hubs & switches.
Second family is everything that might actually have something to say. This includes all computers, networked printers and other devices, and routers (which are really just special-purpose computers).
Connections between the two families always use a straight-thru cable. Connections within the same family always use a crossover cable.