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
A PHP session generally uses a cookie that is stored client side. The following code will clear that cookie thus unlinking the session.
document.cookie = 'PHPSESSID=; expires=Thu, 01-Jan-70 00:00:01 GMT;';