What are some potential pitfalls of using the $_GET variable in PHP functions like showGast()?

Using the $_GET variable directly in PHP functions like showGast() can lead to security vulnerabilities such as SQL injection attacks. To mitigate this risk, it is recommended to sanitize and validate the input before using it in the function.

function showGast() {
    $gastId = isset($_GET['gast_id']) ? intval($_GET['gast_id']) : 0;
    
    // Use $gastId in the function logic
}