I am having trouble figuring out how to create a javascript function that will destroy a php session. I have a clickable link that will call a function called destroyphpses
Your JavaScript runs client-side, and your PHP runs server-side. You can't call PHP functions from JavaScript this way. You have two options: