title: var undefined getting value $ _GET ['page']
body: <p>I want paging is a content of a news blog. Everything works correctly, the page content is successful. But I get an error screen displays PHP:</p>
  
  <p><strong>Notice: Undefined index: page in C:\wamp\www\index.php on line 146</strong></p>
  
  <p>code with the line that gives the error:</p>
  
  <pre><code>$maxreg = 1;
  
      $pag = $_GET['page'];
  
  if (!isset($pag) || empty($pag)){
  
        $min = 0;
        $pag = 1;  
  
  }else{
  
        if($pag == 1){
  
              $min = 0;
  
        }else{
  
              $min = $maxreg * $pag;
              $min = $min - $maxreg;
  
        }
  }
  
  include("js/class.AutoPagination.php");
  $obj = new AutoPagination(contar_contenido(), $pag);
  
  mostrar_contenido($min,$maxreg);
  
  echo $obj-&gt;_paginateDetails();
  </code></pre>
  
  <p>The line gives the error is this:</p>
  
  <pre><code>$ page = $ _GET ['page'];
  </code></pre>
  
  <p>The first page by default index.php and contains no var in the url.
  I do not understand why if fails below by a conditional var I determine if that has content or not.</p>
  
  <p>Should not show any error php, could someone give me a solution? Thanks</p>