Log in

View Full Version : HTML Stops after I execute a PHP while loop



numpy
04-21-2011, 02:29 PM
As the title states, I have a while loop, and after the loop the markup stops.
here is the index.php:


<?php
include "header.php";
?>
<div id="nav">
<ul id="nav">
<li><a href="#">Course</a></li>
<li><a href="#">Overview</a></li>
<li><a href="#">FAQs</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Login</a></li>
</ul>
</div>
<div id="contentwrapper">
<div id="contentcolumn">

<div class="innertube">
<b>Training Content: </b>
<hr />
<?php if($_GET['view']=="player"){?>
<p class="player"><a
href="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv"
style="display:block;width:520px;height:330px"
id="player">
</a> </p>
<script>
flowplayer("player", {src:"ICI_ProcessApplicatonImages.swf", width:750,height:400});
</script>
<?php }elseif($_GET['view']=="pp"){ ?>
<iframe src="ICIPPS/ICIProcessApplicationImages.html" width="800px" height="460px"></iframe>
<?php }elseif($_GET['view']=='first'){ ?>
Welcome to ICI Training
<?php }?>
</div>
</div>
</div>

<div id="leftcolumn">
<div class="innertube">
<b>Links</b>
<hr />
<?php while($row = $links->fetch_assoc()){ ?>
<div id="navigation">
<ul>
<?php echo"<li><a href=" . $row['location'] . ">" . $row['name'] . "</a></li>";}?>
</ul>
</div>
</div>
</div>

</div>
Here is where it stops


<div id="rightcolumn">
<div class="innertube">
<b>Refferences</b>
<hr />
asdkfasjdfkahsdfa
sdfasdkfjasd;lfkjas'ldkfjasldasd
fasdfkljasdflkjasdfas
dfasldfkjasdlfkjasdf</div>
</div>

<?php include "footer.php";?>


I have done this same thing in numerous other sites, its just odd to me. Let me know if more is needed.

numpy
04-21-2011, 02:38 PM
Nevermind....I figured it out. Silly, SILLY me. I had the <div for navigation INSIDE the loop... so it was well, looping. Thereby killing the rest of the markup.

devogirl
04-26-2011, 06:41 AM
Hahaha, I see it. Be careful.