Jump to content

comment on a post problem


lAZLf

Recommended Posts

on my website, I display posts/updates on the website's development, and I'm trying to make it so that with each post, a viewer can post a comment on it. I can't figure out how to make it so that each post can show different comments.

sorry if i'm not being so clear.

 

where the posts are displayed:

while($row=mysql_fetch_array($result)){

echo'

        <tr>
          <td height="20" class="title">'.$row['title'].'</td><td class="title"><div align="right">'.$row['date'].'
	  </div>
	</td>
      </tr>
  
<tr>
    <td height="100" colspan="2" class="content">'.$row['content'].'
</td>
    </tr>

<tr><td> <a href="javascript:toggle_visibility()" class="link">[comments]</a>
<div id="comments">hi</div>
</td></tr>';

}

 

Link to comment
https://forums.phpfreaks.com/topic/185149-comment-on-a-post-problem/
Share on other sites

SELECT * FROM Archive ORDER BY date DESC

My table for the posts has the columns of "title", "content" and "date". That part works fine (http://annarboruncovered.com/).

 

I'm going to set up a table for the comments with the columns of "content", "poster" and "date".

a column that you can store something unique at each article. For each article you could do something like

SELECT * FROM comments WHERE archive_id=?

 

and archive_id stores, say, the unique id's from the Archive table, or something to that will identify which article you are talking about

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.