Turn on the headlights and try to start it. If the headlights go out, then it is a bad connection. If the headlights stay lit, it is something else. It could be the neutral safety switch, if it is an automatic. Try starting it in "N". Move the shifter while trying to start. If it is a manual transmission, try bumping the starter. Tap the starter, if the starter brushes are worn, a good jolt on the starter can temporarily restore its operation.