#19253 [Opn->Bgs]: random garbage in echo or print output
| From: | georg@php.net | Date: | Thu, 05 Sep 2002 20:28:03 +0000 |
| Subject: | #19253 [Opn->Bgs]: random garbage in echo or print output | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18520@lists.php.net to get a copy of this message | ||
ID: 19253
Updated by: georg@php.net
Reported By: rdavis2@gmu.edu
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: Windows XP Pro
PHP Version: 4.2.2
New Comment:
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2002-09-05 11:16:11] rdavis2@gmu.edu
I am running PHP 4.2.2, Apache 2.0.3.9, and MySQL 4.0.1-alpha-nt
I am using the following code to insert rows in to a html table:
######START CODE######
db_connect();
$result = mysql_query("SELECT * FROM db ORDER BY title");
if ($result) {
for($movies=0; $sts_tmp = mysql_fetch_row($result); ++$movies) {
if($movies % 2 == 0) { $bgcolor="#CCCCCC"; }else{
$bgcolor="#DDDDDD"; }
echo " <TR>\n";
for($x=0;$x<6;++$x)
print " <TD BGCOLOR='$bgcolor'>$sts_tmp[$x]</TD>\n";
echo " <TD BGCOLOR='$bgcolor'><INPUT TYPE='BUTTON'
VALUE='Delete'
ONCLICK=\"JavaScript:document.location='movie.php?action=delete&title=$sts_tmp[0]'\"></TD>\n"
.
" </TR>\n\n";
}
echo "<TR><TD COLSPAN='7'><B>Total Movies: " .
mysql_num_rows($result) . "</B></TD></TR>\n";
mysql_free_result($result);
}
db_close();
######END CODE######
Most of the time the script runs fine, but every other third time or so
extra garbage code appears in with the normal output.
Garbage Code:
<TR>
<TD BGCOLOR='#DDDDDD'>Mallrats</TD>
<TD BGCOLOR='#DDDDDD'>0</TD>
<TD BGCOLOR='#DDDDDD'>0</TD>
<TD BGCOLOR='#DDDDDD'>0</TD>
ðÝSðÝS BGCO @o'#DDDDDD'>CD</TD>
<TD BGCOLOR='#DDDDDD'></TD>
<TD BGCOLOR='#DDDDDD'><INPUT TYPE='BUTTON'
VALUE='Delete'
ONCLICK='JavaScript:document.location="movie.php?action=delete&title=Mallrats"'></TD>
</TR>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19253&edit=1