PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old August 21st, 2002, 01:24 PM
sethadam1 sethadam1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Orlando, FL
Posts: 223 sethadam1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
just once instance of a foreach loop!?

For some reason, ONE table in the middle of a while loop is not rendering properly on my site. Just the 4th loop, of 7 in this case, fails to work. I can't figure it out!

The site can be seen at http://firsttube.com/head.php

The source can be viewed by visiting http://firsttube.com/head.php?viewsource

Also, how come it is appending the PHPSESSID? That just happened when I started trying to fix this problem.

Reply With Quote
  #2  
Old August 21st, 2002, 01:39 PM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to EvilivE
RE: just once instance of a while loop!?

Maybe its me but I don't see a while loop in the source.

Reply With Quote
  #3  
Old August 21st, 2002, 02:31 PM
sethadam1 sethadam1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Orlando, FL
Posts: 223 sethadam1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: just once instance of a while loop!?

Shoot! I meant the foreach loop.

Reply With Quote
  #4  
Old August 21st, 2002, 05:02 PM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to EvilivE
RE: just once instance of a foreach loop!?

When I am troubleshooting nested tables, especially at the scale you have it, I try to make it more readable. So here is your html source for that page:
php Code:
Original - php Code
  1.  
  2. <!--configuration successful -->
  3. <center>
  4. <table width=100%>
  5.   <tr>
  6.     <td width=100% valign=top align=center>
  7.       <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000" WIDTH="100%">
  8.         <TR>
  9.           <TD>
  10.             <TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
  11.               <TR>
  12.             <TD COLSPAN="2" BGCOLOR="#dddddd" WIDTH="100%">
  13.               <table width="100%" cellpadding="0" cellspacing="0">
  14.                 <tr>
  15.                   <td width="60%"><FONT COLOR="#111111"><B>new beta is live and (apparently) operational</B></FONT></td>
  16.                       <td valign="middle" align="center">
  17.                       <TD valign="middle" align="right"><SMALL>Posted by <a href="allnews.php?author=Adam&PHPSESSID=7b244cc6222b6d189c258479565e949c">Adam</a> on 20 Aug 2002, 10:28 PM</SMALL></TD>
  18.                     </TR>
  19.                   </table>
  20.                 </TD>
  21.               </TR>
  22.               <TR BGCOLOR="#ffffff">
  23.             <TD BGCOLOR="#ffffff" COLSPAN="2"><P>Well, firsttube.com 3.2 went live last week, and firsttube.com 3.3 (mostly just graphical smoothing) was built within 2 days. This is firsttube.com 3.3.1 - a nice makeover that I'm much more pleased with.  The design is named "Flip." It's a WAY scaled down <a href="http://tubecode.org">tubeCode</a>.  For more on Flip, see <a href="source.php?PHPSESSID=7b244cc6222b6d189c258479565e9  49c">the source page</a>. <BR></P></TD>
  24.           </TR>
  25.           <TR BGCOLOR="#D7D7D7">
  26.             <TD BGCOLOR="#D7D7D7" ALIGN="right" COLSPAN="2">category: <a href="allnews.php?showcat=Site_Updates&PHPSESSID=7b244cc6222b6d189c258479565e949c" title="more Site Updates">Site Updates</a></TD>
  27.           </TR>
  28.             </TABLE>
  29.           </TD>
  30.         </TR>
  31.       </TABLE><BR>
  32.       <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000" WIDTH="100%">
  33.         <TR>
  34.           <TD>
  35.             <TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
  36.           <TR>
  37.             <TD COLSPAN="2" BGCOLOR="#dddddd" WIDTH="100%">
  38.               <table width="100%" cellpadding="0" cellspacing="0">
  39.                 <tr>
  40.               <td width="60%"><FONT COLOR="#111111"><B>firsttube.com 3.2 rolls out</B></FONT></td>
  41.               <td valign="middle" align="center">
  42.               <TD valign="middle" align="right"><SMALL>Posted by <a href="allnews.php?author=Adam&PHPSESSID=7b244cc6222b6d189c258479565e949c">Adam</a> on 14 Aug 2002, 05:00 PM</SMALL></TD>
  43.             </TR>
  44.                   </table>
  45.             </TD>
  46.           </TR>
  47.           <TR BGCOLOR="#ffffff">
  48.             <TD BGCOLOR="#ffffff" COLSPAN="2"><P>Too much Phish all at once! Now I have to save for LivePhish AND 3 Hampton shows! I'm ecstatic! So excited that I said screw it and jammed firsttube.com 3.2 into gear.  <BR><BR>Welcome to <b>firsttube.com 3.2</b>, with a new and improved news system, more dynamics (you'll see this part shortly...maybe 3.2.1, and a more modern feel to it (based on <a href="http://www.kuro5hin.org">k5</a>).  Please let me know what you think! </P></TD>
  49.           </TR>
  50.           <TR BGCOLOR="#D7D7D7">
  51.             <TD BGCOLOR="#D7D7D7" ALIGN="right" COLSPAN="2">category: <a href="allnews.php?showcat=Site_Updates&PHPSESSID=7b244cc6222b6d189c258479565e949c" title="more Site Updates">Site Updates</a></TD>
  52.           </TR>
  53.             </TABLE>
  54.           </TD>
  55.         </TR>
  56.       </TABLE><BR>
  57.       <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000" WIDTH="100%">
  58.         <TR>
  59.           <TD>
  60.             <TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
  61.           <TR>
  62.             <TD COLSPAN="2" BGCOLOR="#dddddd" WIDTH="100%">
  63.               <table width="100%" cellpadding="0" cellspacing="0">
  64.                 <tr>
  65.               <td width="60%"><FONT COLOR="#111111"><B><font color="red">PHISH REUNITES!</font></B></FONT></td>
  66.               <td valign="middle" align="center">
  67.               <TD valign="middle" align="right"><SMALL>Posted by <a href="allnews.php?author=Adam&PHPSESSID=7b244cc6222b6d189c258479565e949c">Adam</a> on 2002-08-14 at 05:10:42 PM</SMALL></TD>
  68.             </TR>
  69.                   </table>
  70.             </TD>
  71.           </TR>
  72.           <TR BGCOLOR="#ffffff">
  73.             <TD BGCOLOR="#ffffff" COLSPAN="2"><P><font color="red">It's official! <B>PHISH IS RETURNING!</B> With four shows scheduled, new Live Phish available for pre-order, and an album planned for next year, it can finally be said: the wait is over! Stay tuned for details! </font></P></TD>
  74.           </TR>
  75.           <TR BGCOLOR="#D7D7D7">
  76.             <TD BGCOLOR="#D7D7D7" ALIGN="right" COLSPAN="2">category: <a href="allnews.php?showcat=Phish&PHPSESSID=7b244cc6222b6d189c258479565e949c" title="more Phish">Phish</a></TD>
  77.           </TR>
  78.             </TABLE>
  79.           </TD>
  80.         </TR>
  81.       </TABLE><BR>
  82.       <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000" WIDTH="100%">
  83.         <TR>
  84.           <TD>
  85.             <TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
  86.           <TR>
  87.             <TD COLSPAN="2" BGCOLOR="#dddddd" WIDTH="100%">
  88.               <table width="100%" cellpadding="0" cellspacing="0">
  89.                 <tr>
  90.               <td width="60%"><FONT COLOR="#111111"><B>SERIOUS TORNADO ADVISORY</B></FONT></td>
  91.               <td valign="middle" align="center">
  92.               <TD valign="middle" align="right"><SMALL>Posted by <a href="allnews.php?author=Adam&PHPSESSID=7b244cc6222b6d189c258479565e949c">Adam</a> on 2002-08-08 at 07:59:41 PM</SMALL></TD>
  93. <!-- ***** -->      </
  94.                   </table>
  95.             </TD>
  96.           </TR>
  97.           <TR BGCOLOR="#ffffff">
  98.             <TD BGCOLOR="#ffffff" COLSPAN="2"><P>Pork Tornado, John Fishman's side project, self-titled debut album comes out on Rykodisc this fall, in record stores on October 1.  See <a href="http://www.phish.com/print/news_print.html">news</a> for more. test...</P></TD>
  99.           </TR>
  100.           <TR BGCOLOR="#D7D7D7">
  101.             <TD BGCOLOR="#D7D7D7" ALIGN="right" COLSPAN="2">category: <a href="allnews.php?showcat=Audio" title="more Audio">Audio</a></TD>
  102.           </TR>
  103.             </TABLE>
  104.           </TD>
  105.         </TR>
  106.       </TABLE><BR>
  107.       <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000" WIDTH="100%">
  108.         <TR>
  109.           <TD>
  110.             <TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
  111.           <TR>
  112.             <TD COLSPAN="2" BGCOLOR="#dddddd" WIDTH="100%">
  113.               <table width="100%" cellpadding="0" cellspacing="0">
  114.                 <tr>
  115.               <td width="60%"><FONT COLOR="#111111"><B>Trey @ Merriweather Posted</B></FONT></td>
  116.               <td valign="middle" align="center">
  117.               <TD valign="middle" align="right"><SMALL>Posted by <a href=allnews.php?author=Adam>Adam</a> on 2002-08-04 at 12:01:32 PM</SMALL></TD>
  118.             </TR>
  119.                   </table>
  120.             </TD>
  121.           </TR>
  122.           <TR BGCOLOR="#ffffff">
  123.             <TD BGCOLOR="#ffffff" COLSPAN="2"><P>For those waiting with baited breath, set 2 of Trey at Merriweather has been posted.  MANY thanks to the phan who submitted these files! If you'd like to submit files to firsttube.com, please <a href=contact.php>contact me</a>!</P></TD>
  124.           </TR>
  125.           <TR BGCOLOR="#D7D7D7">
  126.             <TD BGCOLOR="#D7D7D7" ALIGN="right" COLSPAN="2">category: <a href="allnews.php?showcat=Audio" title="more Audio">Audio</a></TD>
  127.           </TR>
  128.             </TABLE>
  129.           </TD>
  130.         </TR>
  131.       </TABLE><BR>
  132.       <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000" WIDTH="100%">
  133.         <TR>
  134.           <TD>
  135.             <TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
  136.           <TR>
  137.             <TD COLSPAN="2" BGCOLOR="#dddddd" WIDTH="100%">
  138.               <table width="100%" cellpadding="0" cellspacing="0">
  139.                 <tr>
  140.               <td width="60%"><FONT COLOR="#111111"><B>Archives accessible for all!</B></FONT></td>
  141.               <td valign="middle" align="center">
  142.               <TD valign="middle" align="right"><SMALL>Posted by <a href=allnews.php?author=Adam>Adam</a> on 2002-07-30 at 11:10:41 PM</SMALL></TD>
  143.             </TR>
  144.                   </table>
  145.             </TD>
  146.           </TR>
  147.           <TR BGCOLOR="#ffffff">
  148.             <TD BGCOLOR="#ffffff" COLSPAN="2"><P>Whoa! The archives are now available for all on my old web host! They will probably cut off my site once we hit the limit, but hey, download what you want while you can at > <a href="http://coach.tier1host.net/~firsttube.com/">http://coach.tier1host.net/~firsttube.com</a></P></TD>
  149.           </TR>
  150.           <TR BGCOLOR="#D7D7D7">
  151.             <TD BGCOLOR="#D7D7D7" ALIGN="right" COLSPAN="2">category: <a href="allnews.php?showcat=Audio" title="more Audio">Audio</a></TD>
  152.           </TR>
  153.             </TABLE>
  154.           </TD>
  155.         </TR>
  156.       </TABLE><BR>
  157.       <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#000000" WIDTH="100%">
  158.         <TR>
  159.           <TD>
  160.             <TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
  161.           <TR>
  162.             <TD COLSPAN="2" BGCOLOR="#dddddd" WIDTH="100%">
  163.               <table width="100%" cellpadding="0" cellspacing="0">
  164.                 <tr>
  165.               <td width="60%"><FONT COLOR="#111111"><B>Announcing a Contest!</B></FONT></td>
  166.               <td valign="middle" align="center">
  167.               <TD valign="middle" align="right"><SMALL>Posted by <a href=allnews.php?author=Adam>Adam</a> on 2002-07-26 at 02:30:31 PM</SMALL></TD>
  168.             </TR>
  169.                   </table>
  170.             </TD>
  171.           </TR>
  172.           <TR BGCOLOR="#ffffff">
  173.             <TD BGCOLOR="#ffffff" COLSPAN="2"><P>Announcing the <a href=logocontest.php>firsttube.com logo contest</a>!  Please see <a href="logocontest.php">http://firsttube.com/logocontest.php</a> for more information.</P></TD>
  174.           </TR>
  175.           <TR BGCOLOR="#D7D7D7">
  176.             <TD BGCOLOR="#D7D7D7" ALIGN="right" COLSPAN="2">category: <a href="allnews.php?showcat=Site_Updates" title="more Site Updates">Site Updates</a></TD>
  177.           </TR>
  178.             </TABLE>
  179.           </TD>
  180.         </TR>
  181.       </TABLE><BR>
  182.       <TR>
  183.         <TD align=center bgcolor=#003366><font face=tahoma color=#c0c0c0 size=2>[<a href=allnews.php><font color="#FFFFFF">view all current news</font></a>]&nbsp;&nbsp;[<a href=viewarchives.php><font color=white>view news archives</font></a>]</TD>
  184.       </TR>
  185.     </td>
  186.   </tr>
  187. </table>

I marked where the problem is. IT is _VERY_ strange that your code outputs </tr> for everyone except the fourth.

Good Luck.

Reply With Quote
  #5  
Old August 21st, 2002, 08:26 PM
sethadam1 sethadam1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Orlando, FL
Posts: 223 sethadam1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: just once instance of a foreach loop!?

no thoughts on why?

thanks EvilLivE


Reply With Quote
  #6  
Old August 21st, 2002, 11:18 PM
guyer guyer is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Bloomington, IN USA
Posts: 47 guyer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to guyer
RE: just once instance of a foreach loop!?

I'm not quite sure why that's happening either. It's very weird. On the session thing though, 4.2 supports a transient session which will automatically append the session id to every link. I think it's a php.ini directive. Did you change anything in there while you were trying to figure it out?

Reply With Quote
  #7  
Old August 22nd, 2002, 01:15 AM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to EvilivE
RE: just once instance of a foreach loop!?

I got it!

This same thing happened to me a little while ago, here is the thread that I created on the same situation you are experiencing now.

HTH

Reply With Quote
  #8  
Old August 22nd, 2002, 04:18 AM
sethadam1 sethadam1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Orlando, FL
Posts: 223 sethadam1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: just once instance of a foreach loop!?

Wow! I have to look into transient session IDs...I'm not sure I immediately understand why that is beneficial. Plus, I don't see why it only affects the 4th iteration of the loop...strangeand head scratching! Either way, I solved the problem a different way late this afternoon by removing the session variable and making it a global var instead. Maybe that wasn't solving it as much as working around it. Then there was no session initiation, hence the second problem - the PHPSESSID appending, was gone too.

I must say, the real question is why it SUDDENLY happened, I was working on the code for two days before that started happening!


Thanks for your time!

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > just once instance of a foreach loop!?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 10 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek