I happen to have this php code that displays records in a gallery. I wish that if a mobile device is vertically oriented and would show only 10 images.
My idea would be to include a conditional depending on resolution have the device to display more or fewer images.
require_once("conexion.php");
$RegShow=20;
if(isset($_GET['pag'])){
$RegistrosAEmpezar=($_GET['pag']-1)*$RegShow
$PagAct=$_GET['pag'];
}else{
$RegistrosAEmpezar=0;
$PagAct=1;
}
I'm trying to make a responsive web and not well suited if I put so many images at once.
My problem is I do not know if there was anything to detect with PHP or should serve a different php file using JS depending on the resolution.
Thanks.