You can simply do this. In php, you can determine button click by use of
if(isset($_Post['button_tag_name']){
echo "Button Clicked";
}
Therefore you should modify you code as follows:
<?php
if(isset($_Post['select']){
echo "select button clicked and select method should be executed";
}
if(isset($_Post['insert']){
echo "insert button clicked and insert method should be executed";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<form action="functioncalling.php">
<input type="text" name="txt" />
<input type="submit" name="insert" value="insert" onclick="insert()" />
<input type="submit" name="select" value="select" onclick="select()" />
</form>
<script>
//This will be processed on the client side
function insert(){
window.alert("You click insert button");
}
function select(){
window.alert("You click insert button");
}
</script>
</body>
</html>