I have a php website thats more or less like this. PHP noob here.

**Index.php**

```
<? 
include('conexion.php');
include('funciones.php');
?>

<head>
</head>

<body>
    <?php
    if (!empty($_GET["palabra"])) {
      function1($conexion);     
    } elseif (!empty($_GET["letra"])) {
      include('letra.php');
    } elseif (!empty($_POST["buscar"])) {
      include('search.php');
    } else {
      function3($conexion);
    }
    ?>
</body>

```

All functions fuctions and database connections are defined in the included files.

Website uses only a single html file, so all the content is included or called by the functions. Is there a good way for the website to identify which "section" or content is the user browsing?
So, for example I want a function to run only when the user is using the search page, should I continue to use the REQUEST to identify what the user is doing? Should I insert a variable like $section and then if($section=search){dosomething()} or maybe using the URL? should I use another approach?