Re: Displaying MySQL data inside of a table

From: Date: Mon, 28 Jul 2003 15:49:23 +0000
Subject: Re: Displaying MySQL data inside of a table
Groups: php.general 
Request: Send a blank email to php-general+get-157194@lists.php.net to get a copy of this message
desa15@necso.es wrote: > $mysql_link = mysql_connect("localhost", USER, PASS); > > mysql_select_db(DB, $mysql_link); > > $SQL = "SELECT * FROM tbl"; > > $result = mysql_query($SQL, $mysql_link) or die (mysql_error()); > > echo "<table border="1" cellpadding="5">"; > > while($resultat = @mysql_fetch_array($result)) { > > echo "<tr><td> > > $resultat[ip] > > </td>"; here is '</tr>' missing: </td></tr>"; > echo "</table"; > } the echo '</table>'; should come after the closed while: } echo '</table>'; > $mysql_link=mysql_close($mysql_link); > > Un saludo, Danny ciao SVEN Excuse me, i write directly in the e-mail

« previous php.general (#157194) next »