DOH! <tail-betweek-legs>
think i'll keep myself to myself from now on </tail-betweek-legs> On Thu, Oct 31, 2002 at 09:32:41PM +0100, BAROILLER Pierre-Emmanuel wrote: > You've forgotten the "</table>" in your echo... > html_header() and html_footer() put html in the right place in your page > but, like you haven't close your <table> tag, > the footer dans be everywhere in your page (depends on the web browser > you're using).. > > Regards, > P.E. Baroiller > > I have a small piece of code which does the following: > > 1) call a function to print an html header, > 2) query a database to list the users in the db, > 3) print an html footer. > > problem is it print out the footer before the table, even though it is > called after. looking at the html source of the page in a browser, show that > the table is first, why is this happening? here is the code: > > html_header(); > echo "<table border=\"1\" width=\"80%\" cellpadding=\"0\" > cellspacing=\"0\">\n"; > echo "<tr>\n"; > echo "<td><b>uid</b></td>\n"; > echo "<td><b>username</b></td>\n"; > echo "<td><b>password</b></td>\n"; > echo "<td><b>session id</b></td>\n"; > echo "<td><b>email address</b></td>\n"; > echo "</tr>\n"; > $query = "SELECT * FROM users LIMIT 0,30"; > $result = mysql_query($query); > while ($query_data = mysql_fetch_row($result)) > { > echo "<tr>\n"; > foreach ($query_data As $column) > { > echo "\t<td>$column</td>\n"; > } > echo "</tr>\n"; > } > echo "<br><br>\n"; > html_footer(); > > -- > Mat Harris OpenGPG Public Key ID: C37D57D9 > [EMAIL PROTECTED] matthewh.genestate.com > > "Mat Harris" <[EMAIL PROTECTED]> a écrit dans le message de news: > [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Mat Harris OpenGPG Public Key ID: C37D57D9 [EMAIL PROTECTED] matthewh.genestate.com
msg83657/pgp00000.pgp
Description: PGP signature