New Member
Reaction score
Hello I will post the code below but I talked to a few people from X10 and they said check your code and a few other things well I came to the community because here is what I have is a PHP script that is supposed to show all the posts for a user and if the user has not posted then it should show up with a custom error code well even though the script runs there's nothing in the database but yet no error shows up indicating that there were no posts found could the community please help ill post the code below so that yall can post back on how to fix it or something but I really need this script so please help (Code below)

mysql_connect ("localhost", "DB_user","DB_pass") or die (mysql_error());
mysql_select_db ("DB_name");

$sql = mysql_query("select * from feed WHERE idu = '".$user['idu']."'");
while($info = mysql_fetch_array($sql)){
Echo "Sorry but this user has not yet posted anything.";
//Outputs the user post data
Echo "<div class='postid'><a href='post?id=".$info['id']."'>".$lang['post_number']."".$info['id']."</a> | <a href='profile?id=".$info['idu']."'>".$info['username']."</a> | ".$info['date']."<div class='delete'><form name='frmMain' action='delete.php' method='post' OnSubmit='return onDelete();'><input type='checkbox' name='chkDel[]' value='".$info["id"]."'><<<
<input type='Submit' name='btnDelete' value='Delete'></form></div></div>";
if($info['text'] == True){
Echo $info['text'];
Echo "<hr color='#e74c3c'>";
if($info['picture'] == True){
echo "<img src='".$info['picture']."' alt='Feed picture'>";
Echo "<hr color='#9b59b6'>";
if($info['video'] == True){
if($info['youtube'] == '1'){
echo "<iframe class='youtube_api' src='//".$info['video']."' frameborder='0' allowfullscreen></iframe>";
Echo "<hr color='#ecf0f1'>";
if($info['music'] == True){
if($info['soundcloud'] == '1'){
echo "<iframe class='soundcloud_api' scrolling='no' frameborder='no' src='".$info['music']."'></iframe>";
Echo "<hr color='#e67e22'>";
if($info['grooveshark'] == '1'){
echo "If you see this API please reload the page for it is only in developer ALPHA so it is restricted to the public.";
Echo "<hr color='#e67e22'>";
Echo $lang['no_post_data'];
Echo "<hr color='#34495e'>";