<?php
$DB_host = "localhost";
$DB_user = "root";
$DB_pass = "";
$DB_name = "nome_tabella";
$conn = mysqli_connect($DB_host,$DB_user,$DB_pass,$DB_name) or mysqli_error();
session_start();
$iduser = $_SESSION["iduser"];
$queryutenti = mysqli_query($conn, "SELECT * FROM tbl_user WHERE id='".$iduser."'");
$quantiutenti = mysqli_num_rows($queryutenti);
$rs = mysqli_fetch_array($queryutenti);
//campi tabella
$id = $rs['id'];
$nome = $rs['nome'];
$email = $rs['email'];
$eta = $rs['eta'];
$separoeta = explode('-', $eta);
$annoeta = $separoeta[0];
$meseeta = $separoeta[1];
$giornoeta = $separoeta[2];
$modificoeta = $giornoeta."-".$meseeta."-".$annoeta;
$img = $rs['urlimg'];
$data = date("Y-m-d H:i:s");
$anni = $data-$eta;
?>
<center>
<div class="pageuser">
<div class="img_profilo">
<?php
if($img == ""){
?>
<img src="img/default.png"/>
<?php
}else {
?>
<img src="<?php echo $img; ?>"/>
<?php
}
?>
</div>
<?php
// Stampi a video le info che vuoi
?>
<div class="name"><?php echo $nome;?></div>
<div style="font-size: 12px;"><?php echo $email; ?></div>
<div style="font-size: 12px;"><?php echo $anni; ?> Anni</div>
</div>
</center>