please help me this code, when i click button, it shows
Notice: Undefined variable: result in C:\xampp\htdocs\tinhtong_luatoantu.php on line 47
<?php 
    $nhapso1 = isset($_GET['so1']) ? $_GET['so1'] : '-1';
    $nhapso2 = isset($_GET['so2']) ? $_GET['so2'] : '-1';
    $pheptinh = $_GET['toantu'];
    if ($nhapso1 < 0 || $nhapso2 < 0) {
        echo 'Vui lòng nhập vào toán hạng & chọn toán tử';
    }
    else {
        switch($pheptinh) {
            case '------':
                echo 'Vui lòng nhập vào toán hạng & chọn toán tử';
                break;
            case '+':
                $result = $nhapso1 + $nhapso2;
                break;
            case '-':
                $result = $nhapso1 - $nhapso2;
                break;
            case '*':
                $result = $nhapso1 * $nhapso2;
                break;
            case '/':
                $result = $nhapso1 / $nhapso2;
                break;
            default:
                echo '';
                break;
        }
        echo round($result, 2);
    }
?>
 
     
     
    