logo       

Re: Create table with varying results: msg#03550

php.general

Subject: Re: Create table with varying results

Like John, I tried several times (both Mac and Windows IE) and never got
anything funny. How many times do you usually have to refresh before you
see the problem? (I think I viewed it 4 times).

miguel

On Thu, 23 May 2002, Tim Greenleaf wrote:
> The errors appear to be the result of strings not terminating properly from
> the PHP output. Then partial HTML code is inserted in cells or at the top
> of the table.
>
> I have stripped everything out and am now just creating a loop to build a
> table and still get the same errors. I have checked it with IE 5.5, IE 6,
> NS 4.78 and NS6.2.2 all with the same type of errors.
>
> Here is a link to the page that creates the table:
> http://www.coloradowinware.com/sample/error/sample.php Depending on your
> connection speed it may take a few seconds, it is generating 650 rows. You
> may need to refresh a couple of times to see the errors. Some times there
> is text printed above the table and sometimes there is partial html in table
> cells and other times there may be colored cells.
>
> Here is the source for the page:
>
> Thanks for your help.
>
>
> <HTML>
> <HEAD>
> <TITLE>PHP Test</TITLE>
> </HEAD>
>
> <body>
>
> <?php
> buildtable()
> ?>
>
> <?php
> function buildtable()
> {
>
> //print header row
> print "<table border='2' cellspacing='0' bordercolor='#C0C0C0' width='97%'
> id='AutoNumber2' style='border-collapse: collapse' bgcolor='#FFFFFF'>";
> print "<tr>";
> print "<td width='4%' align='center' bgcolor='#FFCC00'>&nbsp;</td>";
> print "<td width='28%' align='center' bgcolor='#FFCC00'><b><font
> size='2' face='Verdana'>Name</font></b></td>";
> print "<td width='13%' align='center' bgcolor='#FFCC00'><b><font size='2'
> face='Verdana'>Phone</font></b></td>";
> print "<td width='29%' align='center' bgcolor='#FFCC00'><b><font size='2'
> face='Verdana'>E-Mail</font></b></td>";
> print "<td width='22%' align='center' bgcolor='#FFCC00'><b><font size='2'
> face='Verdana'>Department</font></b></td>";
> print "<td width='4%' bgcolor='#FFCC00'>&nbsp;</td>";
> print "</tr>";
> //end print header row
>
> $i=0;
> $number = 650;
> while ($i < $number) :
> $name = "Fred Flintstone";
> $email = "My Mail";
> $department = "Department";
>
> print "<tr>";
> print "<td width='4%' align='center' bgcolor='#FFFFFF'><p align='center'
> bgcolor='#FFFFFF'><font size='1' face='Verdana'>" . $i . "</font></td>";
> print "<td width='28%' bgcolor='#FFFFFF'><font size='1'
> face='Verdana'>fred</font></td>";
> print "<td width='13%' bgcolor='#FFFFFF'><font size='1'
> face='Verdana'>255-3698</font></td>";
> print "<td width='29%' bgcolor='#FFFFFF'><a
> href=mailto:fred@xxxxxxxxx><font size='1'
> face='Verdana'>fred</font></a></td>";
> print "<td width='22%' bgcolor='#FFFFFF'><font size='1'
> face='Verdana'>department</font></td>";
> print "<td width='4%' bgcolor='#FFFFFF'>&nbsp;</td>";
> print "</tr>";
> $i++;
> endwhile;
>
> // close table
> print "</table>";
>
> return;
> }
> ?>
>
> </body>
> </html>
>
>
>
>
> "Miguel Cruz" <mnc@xxxxxxxxx> wrote in message
> news:Pine.LNX.4.44.0205231552140.21800-100000@xxxxxxxxxxxx
> > What is the specific nature of the errors in the HTML? Are random
> > characters missing/inserted, or does it look like something that could
> > happen as a result of unexpected program behavior at a higher level?
> >
> > miguel
> >
> > On Thu, 23 May 2002, Tim Greenleaf wrote:
> > > The source HTML (PHP Output) is sometimes correct and sometimes
> incorrect
> > > with the exact same script and SQL statement. The table is very basic.
> > >
> > > I thought maybe I had some problems with formatting variables in the
> HTML so
> > > I took all the formatting out of the script so it is really basic now
> and
> > > still have the same problem. I also thought maybe there were issues
> with
> > > the data...i.e. with nulls and non-alpha-numeric characters. I cleaned
> all
> > > the data so there is no null data and all characters are alpha-numeric.
> > > Still have the same problem.
> > >
> > > Very strange.
> > >
> > > Tim
> > >
> > >
> > >
> > >
> > >
> > >
> > > "Miguel Cruz" <mnc@xxxxxxxxx> wrote in message
> > > news:Pine.LNX.4.44.0205231407160.20585-100000@xxxxxxxxxxxx
> > > > Are you using Internet Explorer for Windows to view the HTML? It has
> some
> > > > rendering problems with complex tables that result in very erratic
> > > > behavior in certain circumstances (which I have yet to understand).
> View
> > > > the page in another browser, or better yet, view the source code.
> That's a
> > > > better way to determine whether or not your program is generating the
> > > > correct data.
> > > >
> > > > miguel
> > > >
> > > > On Thu, 23 May 2002, Tim Greenleaf wrote:
> > > > > I have a search page that creates a dynamic table of results from MS
> SQL
> > > > > Server. The table created on the web page does not always get
> created
> > > > > properly for the same recordset. Sometimes a field may have a black
> or
> > > red
> > > > > background color and if the same exact search is run again it will
> > > display
> > > > > properly. If I have a search with large number of records (few
> > > thousand)
> > > > > there is usually html text printed above the table of results. If I
> > > perform
> > > > > the exact search multiple times, I will get different html text
> printed
> > > > > above the table.
> > > > >
> > > > > It seems as if the PHP engine/interpretor is not processing the
> script
> > > > > properly. I would think if I had a syntax issue with the script or
> HTML
> > > it
> > > > > would either error out or return the same results everytime.
> > > > >
> > > > > Has anyone else seen this problem before?
> > > > >
> > > > > w2k SP2
> > > > > IIS
> > > > > PHP 4.2.1
> > > > >
> > > > > Thanks for the help.
> > > > >
> > > > > Tim
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > >
> >
>
>
>
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise