william mckinley was the 25th president and he was elected in 1897 and was president to 1901 and was assassinated at the temple of music by 2 shots to the head and died on the 14th september 1901