include_once("include/header.inc"); ?>
include_once("include/sx.inc"); ?>
$sql = "SELECT * FROM post WHERE online='S' ORDER BY data DESC LIMIT 1";
$exec = mysql_query($sql,$conn)
or die("Errore: ".mysql_error());
$ris = mysql_fetch_array($exec);
$data = explode("-", $ris['data']);
$mese = $data[1];
$giorno = $data[2];
include_once("include/time.inc");
?>
print $m; ?>
print $giorno; ?>
print $ris['testo']; ?>
$sqlcat = "SELECT * FROM categorie WHERE id='".$ris['categoria']."'"; $execcat = mysql_query($sqlcat,$conn) or die("Errore: ".mysql_error()); $riscat = mysql_fetch_array($execcat); ?> print $riscat['categoria']; ?> | $sqlcm = "SELECT * FROM commenti WHERE id_post='".$ris['id']."' and online='S'"; $execcm = mysql_query($sqlcm,$conn) or die("Errore: ".mysql_error()); $numcm = mysql_numrows($execcm); if ($numcm>0) { if ($numcm==1) {?> 1 commento | } else {?> print $numcm; ?> commenti | } } else {?> Nessun commento | }?> Commenta