Help on showing results on screen
| From: | Gloria L. McMillan | Date: | Fri, 06 Jun 2003 00:42:09 +0000 |
| Subject: | Help on showing results on screen | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-150495@lists.php.net to get a copy of this message | ||
Someone who knows php helped me to put together this code to show resulty screen.
There were about 30 items on the working model.
I tried to modify it to showing the Date and only the long comment item q40.
But all that gets shown is: ] (this symbol)
Here is my HTML code in the Adj03.php file.
I have been wracking my brain and any help is much appreciated!!
gloria
-------------------------------
/* 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>Q40</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>