shubhajeet Posted January 17, 2007 Share Posted January 17, 2007 hi to everybody.please tell me how could i call php function through javascript events such that onmouseover, onclick etc. Link to comment https://forums.phpfreaks.com/topic/34573-how-to-deal-with-events-in-php/ Share on other sites More sharing options...
paul2463 Posted January 17, 2007 Share Posted January 17, 2007 you can only do that by having an HREF on the event bringing you back to the page, passing a variable for the PHP code to work with, all PHP code is parsed and acted on before it is sent to your client side, therefore if you want PHP to act on something you have to refresh the page somehow or send it away and bring it back Link to comment https://forums.phpfreaks.com/topic/34573-how-to-deal-with-events-in-php/#findComment-162840 Share on other sites More sharing options...
shubhajeet Posted January 17, 2007 Author Share Posted January 17, 2007 what should i do if i required to disconnect a connection on click event of a button. what should i do. how can i pass a value of a connection to new page of php. i am trying to send it via $variable = $odbc_pconnect(....);<a href="link.php?variable">log of</a>.but not working at all. Link to comment https://forums.phpfreaks.com/topic/34573-how-to-deal-with-events-in-php/#findComment-162848 Share on other sites More sharing options...
trq Posted January 17, 2007 Share Posted January 17, 2007 A database connection only lasts the duration of script execution. If you trying to log a user out, just send them to a page which clears there session. Link to comment https://forums.phpfreaks.com/topic/34573-how-to-deal-with-events-in-php/#findComment-162852 Share on other sites More sharing options...
shubhajeet Posted January 17, 2007 Author Share Posted January 17, 2007 i am preparing a connection as pconnect which means it maintains a connection till i don't disconnect it programatically. how could i do this by programming through event based. Link to comment https://forums.phpfreaks.com/topic/34573-how-to-deal-with-events-in-php/#findComment-162858 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.