Jump to content

Recommended Posts

Hi Friends,

 

I Created a Forum, Which is working nice but i am not getting how can i give link to the author of the post. How to retrieve his profile only, If i give link. Please give some suggestions.

 

Below is my code 

 

echo"<table width='90%' border='0' align='center' cellpadding='3' cellspacing='1' bgcolor='#CCCCCC'>
<tr>
<td width='6%' align='center' bgcolor='#E6E6E6'><strong>#</strong></td>
<td width='53%' align='center' bgcolor='#E6E6E6'><strong>Topic</strong></td>
<td width='15%' align='center' bgcolor='#E6E6E6'><strong>Views</strong></td>
<td width='13%' align='center' bgcolor='#E6E6E6'><strong>Replies</strong></td>
<td width='13%' align='center' bgcolor='#E6E6E6'><strong>Author</strong></td>
</tr>";


$query=" SELECT * FROM $tbl_name   limit $eu, $limit ";
$result=mysql_query($query);
echo mysql_error();


while($row=mysql_fetch_array($result)){ // Start looping table row

echo "<tr>";
echo "<td bgcolor='#FFFFFF'>";
echo $row['id'];
echo "</td>";
echo "<td bgcolor='#FFFFFF'>";
echo "<a href='viewtopic_ct.php?id=".$row['id']."'>".$row['topic']."</a><BR></td>";
echo "<td align='center' bgcolor='#FFFFFF'>";
echo $row['view'];
echo "</td>";
echo "<td align='center' bgcolor='#FFFFFF'>";
echo $row['reply'];
echo "</td>";
echo "<td align='center' bgcolor='#FFFFFF'>";
echo $row['name'];
echo "<br/>";
echo $row['datetime'];
echo "</td>";
echo "</tr>";

// Exit looping and close connection
}

 

Like for viewing topic i given link. How to give link to author how can i fetch his profile from userlist.

Link to comment
https://forums.phpfreaks.com/topic/131154-giving-link-for-author-name-in-forum/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.