Salve ragazzi, ho questa funzione, vorrei elencare i dati contenuti in un database, però cosi mi da solo l'ultimo valore inserito in tabella, ecco il codice:
Codice PHP:
public function informazioni() { require_once('includes/config.php'); $query = "SELECT * FROM page"; $res = @mysql_query($query) or die (mysql_error ()); $i = 0; while ($row = @mysql_fetch_array($res)) { $tit = $row['page_title']; $tit = ucwords($tit); $ind = $row['indirizzo']; } echo <<<INFO <table width="179" border="0" cellspacing="2" cellpadding="0"> <tr> <td height="200" align="left" valign="top" id="informazioni"><table width="160" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="top" id="contenuto_info">[url="$ind"]$tit[/url]
</td> </tr> </table></td> </tr> </table> INFO; }
Grazie