using any html event can we call php function?

Code:
<input type=button onclick="add()"/>
.
.
.
<?php
function add()
{
..
}
?>
is this possible.
How can we achieve this. plz reply.........