I'm trying to get submit form event to update a field. I found a test code on internet and that's worked. But when I change the button name for my button nothing happens, and the if always returns false to my button and I have no idea what i'm doing wrong.
Example code works:
<form action="" method="POST">
    <input type="submit" name="add" Value="Call Add fun">
    <input type="submit" name="sub" Value="Call Sub funn">
<?php echo @$a; ?>
<?php
if(@$_POST['add'])
{
    function add()
    {
        $a="You clicked on add fun";
        echo $a;
    }
    add();
} else if (@$_POST['sub']) {
    function sub()  
    {
        $a="You clicked on sub funn";
        echo $a;  
    }
    sub();  
}
?>
I've tried some variations with if (isset($_POST["course_submit_btn"])) but again nothin happens.
I don't know if it has any interface, but the page url is "panel/create-course/?course_ID=3493/"
 
    