Jump to content

Need A Second Set of Eyes


computermax2328

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.