Re: Need help with display of results

From: Date: Fri, 06 Jun 2003 23:36:04 +0000
Subject: Re: Need help with display of results
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-150554@lists.php.net to get a copy of this message
I will send my whole php file to anybpody willing to help me display this one long answer question. Some previous helpers added some stuff that isn't being used, but I don't know how to get rid of it. Gloria "Gloria L. McMillan" wrote: > Hi, again! > > I did not see my question as yet so I will repost it. > > I have had help writing HTML code to display the results of my PHP--> McSQL actions. > > But when I attempt to show the DATE and q40 (comments) with the HTML code below, > all I see on screen is: ] in the upper left corner. > > URL: http://DakotaCom.net/~glomc/forms/Adj03.html (A poll on > part-time faculty) > > Here's the code for the display that is not working... > But the "]" may refer to earlier code in this long php file. > I did not send the whole file, only the HTML part. > > /* Printing results in HTML */ > > /* COMMENTED 2002-05-02 > print "<table>\n"; > while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { > print "\t<tr>\n"; > foreach ($line as $col_value) { > print "\t\t<td>$col_value</td>\n"; > } > print "\t</tr>\n"; > } > print "</table>\n"; > */ > while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { > printf(" > <div class=\"colorfield\"> > <table> > <tr><th>DATE</th><th>COMMENTS</th></tr>\n > > <tr><td>%s</td><td>%s</td></tr> > > </table> > > </div> > <br /> > <br />\n", > $row['added']); > $row['q40']); > > } > > /* Free resultset */ > > mysql_free_result($result); > > /* Close the database connection */ > > mysql_close($link); > > ?> > > </body> > </html>

« previous php.general (#150554) next »