ecco il codice ^^codice:<? include("top_foot.inc.php"); include("config.inc.php"); top(); $db = mysql_connect($db_host, $db_user, $db_password); if ($db == FALSE) die ("Errore nella connessione. Verificare i parametri nel file config.inc.php"); mysql_select_db($db_name, $db) or die ("Errore nella selezione del database. Verificare i parametri nel file config.inc.php"); if (!isset($start) OR $start<0) $start=0; $step = 20; $query = "SELECT id,titolo,TTH FROM TTH ORDER BY data DESC LIMIT $start,$step"; $result = mysql_query($query, $db); while ($row = mysql_fetch_array($result)) { echo "" . date("j/n/y", $row[data]) . " - $row[titolo] "; } //questa riga mi da sempre errore ?> <table width=90% border=0><tr> <td width=20% align=left> <? if ($start>0) { $start_back = $start - $step; echo "<a href=all.php?start=$start_back>precedenti</a>"; } ?> </td> <? $result = mysql_query($query, $db); $row = mysql_fetch_array($result); $pages = intval(($row[tot]-1) / $step)+1; ?> <td width=60% align=center> <? for ($i=0; $i<$pages AND $i<20; $i++) { $start_page = $i * $step; echo "<a href=all.php?start=$start_page>" . ($i+1) . "</a> "; } ?> </td> <td width=20%> <? if ($start + $step < $row[tot]) { $start_next = $start + $step; echo "<a href=all.php?start=$start_next>successivi</a>"; } ?> </td> </tr></table> <? echo "<a href=search.php>Cerca negli articoli</a>"; foot(); ?>

Rispondi quotando