Yeah, I'll post the rest of the code:
//follow list
$followList_sql = "SELECT * FROM follow
WHERE username = '$user'";
$getFollow = mysql_query($followList_sql);
$getFollow_RecordCount = mysql_num_rows($getFollow);
//display message is not following anybody
if($getFollow_RecordCount == 0){
echo 'You are not following anyone. You can explore tracks on the <a href="browse.php">browse page</a>.';
echo '<br/>';
echo "Most recent tracks";
echo '<br/>';
$recentTracks_sql = "SELECT * FROM upload
WHERE artist != '$user'
ORDER BY date DESC
LIMIT 0, 5";
$getRecentTracks = mysql_query($recentTracks_sql);
$getRecentTracks_RecordCount = mysql_num_rows($getRecentTracks);
while ($row = mysql_fetch_array($getRecentTracks)){
$track = $row['song'];
echo $track;
}
}
else{
while ($row = mysql_fetch_array($getFollow)){
$follow = $row["follow"];
//check and display follow list
$checkUpload_sql = "(SELECT id, artist, song, nothing, date, count
FROM upload
WHERE artist = '$follow')
UNION (SELECT null, username, null2, bulletin, date, null3
FROM bulletin
WHERE username = '$follow')
ORDER BY `date` DESC";
$getUpload = mysql_query($checkUpload_sql);
$getUpload_RecordCount = mysql_num_rows($getUpload);
while ($row = mysql_fetch_array($getUpload)){
$song = $row['song'];
$bulletin = $row['nothing'];
$id = $row['id'];
$date = $row['date'];
$count = $row['count'];
if($song == NULL){
?>
<table id="post">
<tr>
<td>
<?php echo $bulletin; ?>
</td>
</tr>
<tr>
<td>
<?php echo agoDate($date) . " ago ";
echo '<a href="user.php?user='.$follow.'">'.$follow.'</a>'; ?>
</td>
</tr>
</table>
<br/>
<?php
}
else{
?>
<table id="post">
<tr>
<td class="song">
<?php echo ''.$song.'';
?>
</td>
<td class"playButton">
<?php echo '<button onclick=javascript:play('.$id.') id="button" type="button">play</button>'; ?>
</td>
<td class="playCount">
<?php echo ''.$count.' plays'; ?>
</td>
</tr>
<tr>
<td>
<?php echo agoDate($date) . " ago ";
echo '<a href="user.php?user='.$follow.'">'.$follow.'</a>';?>
</td>
</tr>
</table>
<br/>
<?php
}
}