[jQuery] call a php function with onclick

[jQuery] call a php function with onclick


Hi, I would like to know how it is possibile to call a php function
inside an onclick=function (....), I try to explain me better
I have 2 php functions :
1. add_friend($me,$friend) and
2. remove_friend($me, $firend)
I would like to have 2 links in this way:
<a href="#" id="add-friend" onclick="add_friend($me,$friend)>Add
Friend</a>
<a href="#" id="add-friend" onclick="remove_friend($me,$friend)>Remove
Friend</a>
when I click on the first link I call the add function when I click on
the other the remove
It is something similat to the twitter or pownce code
I have written it on this page:
http://www.jabberout.com/wiki/index.php/Action_buttons
please some easy tutorial to solve it :)
Ciao
Stefano