Jump to content

Need help doing a topic preview with while


Gazan

Recommended Posts

Alright  :D

 

I'm working on creating my own php forum now, but i got stuck during the show topic page. I'd like to do a while to show the replies, and in the while i would like to show the users profile avatars.

 

  $query = mysql_query("SELECT * FROM replies WHERE topic_id = '".$topicid."'");

  while($row = mysql_fetch_assoc($query))

  {

  $replierid = $row['replier_id'];

  $reply = $row['message'];

  $replierdate = $row['replier_date'];

  echo "

  <table align=center width=420 cellspacing=0 cellpadding=0>

  <tr>

  <td align=left>";

                      $query = mysql_query("SELECT * FROM users WHERE id = '".$replierid"'");

  $row = mysql_fetch_assoc($query);

  $repliername = $row['username'];

  echo $repliername;

  echo "<br>";

 

Can you tell me why that doesn't work ?

What im trying to do is to select the user information, in the while.

Is that just not possible?

- if so, how do i do it then?

 

Thanks!

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.