Im trying to build a feeds application in php in which im using a simple table with 2 columns..one for name and one for the respective feeds…my feed is appearing properly but there is some problem with the name heres the code…
<?php
include_once "connect_to_mysql.php";
$sql = mysql_query("SELECT id, feed, feeddate FROM feeds ORDER BY feeddate DESC LIMIT 20");
while($row = mysql_fetch_array($sql))
{
$name = $row["name"];
$uid = $row["userid"];
$ufeed = $row["feed"];
$feeddate = $row["feeddate"];
$feeds .= '
<table width="90%" align="center" cellpadding="4" bgcolor="#A6D2FF">
<tr>
<td width="7%" bgcolor="#FFFFFF"><a href="http://www.project360.in/emp_profile.php?id=' . $uid . '">' . $name . '</a><br />
</td>
<td width="93%" bgcolor="#D9ECFF"> <span style="font-size:10px; font-weight:bold; color:#A6A6A6;">' . $feeddate . '</span><br />
' . $ufeed . '</td>
</tr>
</table>';
}?>
<?php print "$feeds"; ?>
here the $name thing is simply not displaying as a link!please help..
You are selecting only three columns:
“name” is not among them, so it will be always empty.