delickate Posted November 21, 2009 Share Posted November 21, 2009 Hi, Is it possible to call a php function on page close? If yes, could you explain how and where to call? any example code will be appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
cags Posted November 21, 2009 Share Posted November 21, 2009 Certainly not using PHP directly. Javascript may be able to catch an event, but I don't know Javascript well enough to know if they have a 'closing' event trigger. Quote Link to comment Share on other sites More sharing options...
delickate Posted November 21, 2009 Author Share Posted November 21, 2009 Yea javascript could call on page unload but i need to call php function. I would like to delete data when some one close the page. It means I've to use AJAX tech. Quote Link to comment Share on other sites More sharing options...
cags Posted November 21, 2009 Share Posted November 21, 2009 As you say you will have to use the Javacript event to trigger an Ajax call to your php script. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.