Yeah, he knows what you mean; and, he told you that unless you refresh the page, you can't do it with PHP, because it's server side.
Try this site, perhaps.
The events that PHP will respond to are called HTTP requests (GET, POST, etc.) PHP is for controlling servers.
Controlling browsers is for Javascript.