I'm having a brain fart and as dumb/easy as it probably is I can't seem to figure it out and it's really starting to annoy me.
I'm getting 2 errors that are both the same:
Notice: Undefined variable: source in D:\xampp\htdocs\DB\users.php on line 24
This is my users.php:
<?php include('header.php'); ?>
<!-- Main content -->
<section class="content container-fluid">
    <?php
        getSource();
        
        switch($source){
                
            case 'add_user'; //Error here line 24
                
                include "includes/page/add_user.php";
                
            break;
                
            case 'edit_user';  //same error here line 30
                
                include "includes/page/edit_user.php";
                    
            break;
                
            default:
                
                include "includes/page/view_all_users.php";
                
            break;
                
        }
    ?>
</section>
<!-- /.content -->
<?php include('footer.php'); ?>This is my function:
function getSource(){
    
    if(isset($_GET['source'])){
        
        $source = $_GET['source'];
        
    } else {
        
        $source = '';
        
    }
    
}My View_all_users page just has a table displaying all users in database, and my other two pages are empty
