digitaldrake Posted March 16, 2007 Share Posted March 16, 2007 Hi, I'm having a problem and I'm not really sure what is causing it. I'm new to php and I'm trying to make my site more manageable and more dynamic. So I built this function: php:function storyprn($stid="") { dbTie("dbnpr3_bs"); $stqry = "SELECT * FROM stories WHERE storyID='$stid'"; $result = mysql_query($stqry); while ($row = mysql_fetch_array($result) or die(mysql_error())){ echo "<p class='hl'>".$row['title']."</p>"; echo "<p class='bl'>By ".$row['aname']."</p>"; echo $row['story']; } return; } ?> That is called in this file: php:include("wednesday.php"); $id = $_GET["id"]; storyprn($id); ?> and displayed on this page: php: <div id="container"> <div id="right"><?php include("cont_r.php"); ?></div> <div id="left"><?php include("cont_l.php"); ?></div> <div class="section1"><?php include("qstory2.php"); ?></div> <div class="clear"></div> </div> <div class="headfoot"> <p class="mt"><a href="about.htm" title="About us">About us</a> | <a href="contact.htm" title="Contact us">Contact us</a> | <a href="/mlist/?p=subscribe" title="Subscribe">Subscribe</a></p> <p id="copyright">Copyright© The Springfield Byline 2007</p> </div> </body> </html> For some reason, once the include that the function is called in displays on the page, all the html after that is cut off. It just disappears. You can see the effect here: www.springfieldbyline.com/playtime/clintonstumps.php?id=15 It is supposed to look like this: www.springfieldbyline.com/clintonstumps.htm For the life of me I can not figure this out. I'm so stumped I can't even figure out what to call what is happening so that I can properly search for an answer before asking for help. Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/43000-help-with-a-function/ Share on other sites More sharing options...
digitaldrake Posted March 16, 2007 Author Share Posted March 16, 2007 Is there no one that can help me? Link to comment https://forums.phpfreaks.com/topic/43000-help-with-a-function/#findComment-208953 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.