In javascript you can easily run function when an 'event' occured...
can this 'event-handler' (onchange, onload, etc.) implemented in PHP?
Does PHP have 'event-handler'?
Moderator: General Moderators
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: Does PHP have 'event-handler'?
No. The only event handler PHP has (for web apps anyway) is a server page request. PHP is server side. In order to initialize any PHP commands or code, you need to tell the server to process something. That is done through a page request (like I said, for web apps at least). Even with AJAX, processing ocurrs on the server. The JavaScript event handlers trigger the server interaction.chakhar86 wrote:In javascript you can easily run function when an 'event' occured...
can this 'event-handler' (onchange, onload, etc.) implemented in PHP?