Originally posted by DaveHolmes I shoot a K-x which has no sync port... I believe the OP's K-r is also without sync port...
There are hotshoe adapters that sit on top of the camera and provide a PC socket.
However, if you're not going to use a Pentax flash (you said that the AF-540FGZ was out of your price range), watch out for the trigger voltage. This is voltage that is present across the flash's sync contacts when it is charged and ready to fire. Some flashes, particularly older manual ones, can have trigger voltages of 200-300 volts, which is enough to fry the electronic synch circuits of your camera.
This is an advantage of radio triggers, like the cactus units mentioned earlier. There is no direct connection and no danger of voltage damaging your camera. They also eliminate long sync cords that can be tripped over, possibly pulling a camera and tripod over.