Jump to content

Why doesn't it work? Trying to execute a MySQL command - Trying to echo


3raser

Recommended Posts

Why wont $info or $info2 echo out?

 

if ($comments==1) {

mysql_query("SELECT * FROM profilecomments WHERE touser='$output'");
while ($row = mysql_fetch_assoc($get))
{
if ($row[reported]==1) { $reporttext = "[Report]"; } else { $reporttext = "Message Reported"; }
$info = "Posted by ". $row[fromuser] ." on ". $row[date] ."<div align='right'>". $reportext ."</div><br><br>". $row[message] ."<hr><br>";
$info2 = "<a href='profiles.php?addcomment=1'>Add a comment!</a>";
}

} else {

mysql_query("SELECT * FROM profilecomments WHERE touser='$username'");
while ($row = mysql_fetch_assoc($get))
{
if ($row[reported]==1) { $reporttext = "[Report]"; } else { $reporttext = "Message Reported"; }
$info = "Posted by ". $row[fromuser] ." on ". $row[date] ."<div align='right'>". $reportext ."</div><br><br>". $row[message] ."<hr><br>";
$info2 = "<a href='profiles.php?addcomment=1'>Add a coment!</a>";
}

}

if ($viewcount==1) { 
mysql_query("UPDATE users SET profileviews = profileviews + 1 WHERE username='$output'");
}

echo "$message57";
echo "$info";
echo "$info2";

$get=mysql_query("SELECT * FROM profilecomments WHERE touser='$username'");

 

and

 

$get=mysql_query("SELECT * FROM profilecomments WHERE touser='$username'");

 

also you will need

 

$update=mysql_query("UPDATE users SET profileviews = profileviews + 1 WHERE username='$output'");

$get=mysql_query("SELECT * FROM profilecomments WHERE touser='$username'");

 

and

 

$get=mysql_query("SELECT * FROM profilecomments WHERE touser='$username'");

 

also you will need

 

$update=mysql_query("UPDATE users SET profileviews = profileviews + 1 WHERE username='$output'");

 

I found it.

 

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.