Peugeot 306 1.9 - Peugeot key fob/key - Kirsty240287

Bought the car last night, the key was in the ignition, took it for a spin and everything seemed fine. Went to lock it and couldn't, locked all the doors except the back door, climbed out and all was locked. However the key the guy gave me when I bought the car would not unlock it and the button bit you press is missing, you can see the circuit board etc. Long story short, he met me and unlocked the car with a coat hanger, he said he doesn't lock the car and the batteries have run out.

Been having a think today and I know nothing about cars, and have never had a car with central locking or immobliser, but the key works to start the car, but wont lock or unlock the doors, even putting the key in the door wont lock it. I'm getting some batteries later but I don't think their going to work, I'm not sure if the key I have is actually the key for the car! I don't know if the car has an immobliser or not, but having read up I think it does. Just find it strange that the key works in the ignition but not for the doors?

I want to obviously lock my car so any idea's on what to do/buy would be a great help!!??