Maybe it will help if we know what year car at least?
In these cases, where the programming may have been lost, you may need to call a mobile locksmith.
I had a similar issue, and I just removed the entire security immobilizer system on a 2008 Mazda 3 following the manual backwards. I could then start it with the key and had to go to a locksmith to get the key fobs reprogrammed.