Suppose I have a link and a function as below, how can I map this link with the function?
As a result, user click on the link “remove user” will execute the function “remove_user
<a href="xxx">remove all compare items</a>
functio remove_user() {
return mysql_query("DELETE * FROM compre_items");
}
You will have to do something like this:
But this is not good pattern/style to develop web applications.
Check out MVC pattern to separate business and presentation logic. Than MVC frameworks like Zend Framework, Cake PHP or others.