computermax2328 Posted August 17, 2012 Share Posted August 17, 2012 Could someone take a look at this and tell me what I am missing or spelled wrong? None of the echos in the HTML are working. Thanks in advance! <section> <?php $id = $_GET['id']; $query = "SELECT * FROM blog WHERE id=$id"; $select = mysql_query($query); if (!$select) { echo "Query did not work" . mysql_error(); } $row = mysql_fetch_array($select); if (!$row) { echo "fetch did not work" . mysql_error(); } while ($row) { $count = $row['count']; $date = $row['Date']; $title = $row['Title']; $sub = $row['Subtitle']; $author = $row['Author']; $content = $row['Content']; } $addcount = $count + 1; $update = "UPDATE blog SET count=$addcount WHERE id=$id"; $upcount = mysql_query($update); ?> <div id="articlewrap"> <div id="arttitle"> <h1 class="arthead"><?php echo $title;?></h1> </div> <div id="artsub"> <h2 class="artsub"><?php echo $sub;?></h2> </div> <div id="artphoto"> <img class="artphoto" src="#"/> </div> <div id="artinfo"> <p2 class="artauthor"><?php echo $author;?></p2></br> <p3 class="artdate"><?php echo $date;?></p3> </div> <article class="story"> <p class="artcon"><?php echo $content;?></p> </article> </div> </section> Link to comment https://forums.phpfreaks.com/topic/267201-need-a-second-set-of-eyes/ Share on other sites More sharing options...
.josh Posted August 17, 2012 Share Posted August 17, 2012 you have an infinite loop: while ($row) { Link to comment https://forums.phpfreaks.com/topic/267201-need-a-second-set-of-eyes/#findComment-1370039 Share on other sites More sharing options...
computermax2328 Posted August 17, 2012 Author Share Posted August 17, 2012 Thank you! I do that all the time by accident Link to comment https://forums.phpfreaks.com/topic/267201-need-a-second-set-of-eyes/#findComment-1370043 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.