The two buttons on my functioncalling.php page are labeled Submit and Insert.
I want to see which action a button takes when it is pressed. The output must show up on the same page, please. For each button, I, therefore, wrote two routines.
<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>
<?php
function select(){
echo "The select function is called.";
}
function insert(){
echo "The insert function is called.";
}
?>
The issue here is that after clicking any of the buttons, I receive no output.
What exactly am I doing incorrectly?