smc Posted January 21, 2007 Share Posted January 21, 2007 Hiya,Basically I'm trying to achieve a logout buttonNow say I make a function like this[code=php:0]function logout(){ session_destroy();}[/code]How can I incorporate that into a link so when I click on it it ends the session?Thanks a billion, you guys are very helpful! I can't even fathom how much PHP I've learned in the past 24 hours Link to comment https://forums.phpfreaks.com/topic/35144-link-triggering-a-function/ Share on other sites More sharing options...
Jessica Posted January 21, 2007 Share Posted January 21, 2007 Put that on a page and link to the page. Link to comment https://forums.phpfreaks.com/topic/35144-link-triggering-a-function/#findComment-165906 Share on other sites More sharing options...
smc Posted January 21, 2007 Author Share Posted January 21, 2007 I considered that option I just wanted to see if I could save the extra step.Oh well nothing ventured nothing gained, thanks! Link to comment https://forums.phpfreaks.com/topic/35144-link-triggering-a-function/#findComment-165909 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.