The first 2 things to check are does your key fob battery need replacing and then has a fuse blown, if these 2 don't have any effect then you could try disconnecting the car battery for 30 minutes and then try things again. Disconnecting the battery for 30 minutes seems to be a bit like a re-boot for the ECU unit and can often cure certain electrical problems.
You don't have to leave your car unlocked, the passenger doors can all be locked by pressing the locking button on the dash or you can lock each door manually from the inside and then you can lock the driver's door with the key.