<?php
$nomehost = 'host' ;
$utente = 'utente' ;
$password = 'pass';
$database = 'database' ;
$conn = mysql_connect($nomehost,$utente,$password) or die("impossibile connettersi al server errore".mysql_error() ) ;
mysql_select_db($database,$conn) or die("errore nella selezione del database ".mysql_error());
$query = "SELECT * FROM `valle d aosta` WHERE 1 LIMIT 0 , 30";
$ris = mysql_query($query,$conn) or die("errore nella query ".mysql_error());
print("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
<title>Documento senza titolo</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
</head>
<body><table cellpadding=\"0\" cellspacing=\"0\" border=\"1\"><tr> <td>nome</td> <td>indirizzo</td> <td>provincia</td></tr>");
while($riga = mysql_fetch_array($ris)) {
print("<tr><td>$riga[nome]</td>");
print("<td>$riga[indirizzo]</td>");
print("<td>$riga[provincia]</td></tr>");
}
print("</table></body></html>");
?>
con questo codice , riesco a prendere i dati che mi servono dal mio database,
pero' me li stampa tutti in una pagina,
come faccio a far si che dopo 10 risltati, mi metta sotto
pagina1/2/3
ecc...
vorrei delle tabelle con 10 risultati max,
quindi 30 risultati 3 pagine...
grazie