My question is this: Do I have to take only the images that are vertical and change them? I have several images on the site, many of them are horizontal and some vertical. I want to get only the verticals and change their size.
This is my code:
<?php
require_once("classe/conexao.class.php");
$c = new Conexao();
$c->Conecta();
$c->SelecionaBase();
$titulo = $_GET['ti'];
$sql = mysql_query("SELECT * FROM ultimos_eventos WHERE nome_fotos = '$titulo'");
while($aux = mysql_fetch_assoc($sql)){
$nome = $aux['nome_fotos'];
$imagem = $aux['img'];
$id = $aux['id'];
$_SESSION['id'] = $id;
print"
<div class=\"row1\">
<div class=\"portfolio-item col-md-3 col-sm-6\">
<div class=\"portfolio-thumb\">
<img src=\"images/$imagem\" alt=\"$nome\">
<div class=\"portfolio-overlay\">
<h3>$titulo</h3>
<a href=\"images/$imagem\" data-rel=\"lightbox\" class=\"expand\">
<i class=\"fa fa-search\"></i>
</a>
</div> <!-- /.portfolio-overlay -->
</div> <!-- /.portfolio-thumb -->
</div> <!-- /.portfolio-item -->
</div>";
}
mysql_close();
?>
How do I implement this in my code?