title: How to access the slug value in my url?
body: <p>I'd like to know why my code does not show any results.</p>
  
  <p>I have a link in the <code>home.php</code> page, like this:</p>
  
  <pre><code>&lt;a href="../musica/'.$row['slug'].'"&gt;Click here&lt;/a&gt;`
  </code></pre>
  
  <p>and in the <code>musica.php</code> page, I access the slug with:</p>
  
  <pre><code>$slug = $_GET['slug'];
  </code></pre>
  
  <p>and my query looks like this:</p>
  
  <pre><code>select * from musical layers where slug = $slug
  </code></pre>
  
  <p>but it is not returning anything.</p>
  
  <p>This is the full url that my hyperlink goes to:</p>
  
  <pre><code>scrashmusicas.epizy.com/musica/wesley-safadao-banda-garota-safada
  </code></pre>
  
  <p>There are no errors, but I am not able to get the slug value. Can anyone help me?</p>
  
  <p>This is the relevant portion of my musica.php file:</p>
  
  <pre><code>$slug = $_GET['slug'];
  $result_capa = "select * from capas_musicas where slug = $slug";
  $resultados_capa = mysqli_query($conn, $result_capa);
  while($row = mysqli_fetch_assoc($resultados_capa)){
      echo '
          &lt;li&gt;
              &lt;a href="../musica/'.$row['slug'].'"&gt;
                  &lt;div class="box_destaque"&gt;
                      &lt;img src="'.$row['capa_album'].'" border="0"/&gt;
                      &lt;strong&gt;'.$row['nome_album'].'&lt;/strong&gt;
                      &lt;span&gt;'.$row['categoria_album'].'&lt;/span&gt;
                  &lt;/div&gt;
              &lt;/a&gt;
          &lt;/li&gt;
      ';
  }
  </code></pre>