Ending a session with a flash btn

hello, I have a flash header with a log out btn–I was wondering if it is pssible to end a session with this flash btn? or if it is possible to link the btn to a php file that ends the session then sends the user to a new page?