How do I execute a PHP function in an onclick event?

Drymnornamp

New Member
I have some HTML files, and what I want to do, is put something like the following, inside the \[code\]<head>\[/code\] section of the html document:\[code\]<script href="http://stackoverflow.com/questions/3934510/myphpfile.php" />\[/code\]and then somewhere on my page, I want to call a PHP function from an onclick event, like so:\[code\]<a onclick="performPhpFunction();" href="javascript:void(0);">Do something</a>\[/code\]How can I do this?I don't know why, but when searching for a solution tonight, I cannot seem to find one, and I have seen this many times, but forgot how it was done, and now I don't remember which websites I saw it on.
 
Back
Top