title: Send variables by using $_GET in php mvc
body: <p>My route:</p>
  
  <pre><code>class Route
  {
      static function start()
      {
          $controller_name = 'add_task';
          $action_name = 'index';
  
          $routes = explode('/', $_SERVER['REQUEST_URI']);
          if ( !empty($routes[1]) )
          {   
              $controller_name = $routes[1];
          }
          if ( !empty($routes[2]) )
          {
              $action_name = $routes[2];
          }
          $model_name = 'Model_'.$controller_name;
          $controller_name = 'Controller_'.$controller_name;
          $action_name = 'action_'.$action_name;
  
          $model_file = strtolower($model_name).'.php';
          $model_path = "application/models/".$model_file;
          if(file_exists($model_path))
          {
              include "application/models/".$model_file;
          }
          $controller_file = strtolower($controller_name).'.php';
          $controller_path = "application/controllers/".$controller_file;
          if(file_exists($controller_path))
          {
              include "application/controllers/".$controller_file;
          }
          else
          {
              Route::ErrorPage404();
          }
  
          $controller = new $controller_name;
          $action = $action_name;
  
          if(method_exists($controller, $action))
          {
              $controller-&gt;$action();
          }
          else
          {
              Route::ErrorPage404();
          }
      }
  </code></pre>
  
  <p>My .htaccess:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      &lt;IfModule mod_negotiation.c&gt;
          Options -MultiViews
      &lt;/IfModule&gt;
  
      RewriteEngine On
  
      # Redirect Trailing Slashes If Not A Folder...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)/$ /$1 [L,R=301]
  
      # Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  
      # Handle Authorization Header
      RewriteCond %{HTTP:Authorization} .
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>My controller:</p>
  
  <pre><code>&lt;?php
  
  class Controller_tasks extends Controller
  {
      function __construct()
      {
          $this-&gt;model = new Model_tasks();
          $this-&gt;view = new View();
      }
  
      function action_index()
      {   
          if (isset($_GET['page'])){
              $data = $this-&gt;model-&gt;get_data_from_server($_GET['page']);
          }
          else{
              $data = $this-&gt;model-&gt;get_data_from_server($page = 1);
          }
  
          $this-&gt;view-&gt;generate('tasks_view.php', 'template_view.php', $data);
      }
  } 
  </code></pre>
  
  <p>My part of view:</p>
  
  <pre><code>&lt;a href="tasks?page=2"&gt;&amp;larr; Back&lt;/a&gt;
  </code></pre>
  
  <p>What I need to do to send the page number? How to implement this in mvc?
  My route can get only the action name, but not the variable. Can someone help me with this problem?</p>