3raser Posted April 1, 2010 Share Posted April 1, 2010 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"; Quote Link to comment https://forums.phpfreaks.com/topic/197197-why-doesnt-it-work-trying-to-execute-a-mysql-command-trying-to-echo/ Share on other sites More sharing options...
andrewgauger Posted April 1, 2010 Share Posted April 1, 2010 $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'"); Quote Link to comment https://forums.phpfreaks.com/topic/197197-why-doesnt-it-work-trying-to-execute-a-mysql-command-trying-to-echo/#findComment-1035083 Share on other sites More sharing options...
3raser Posted April 1, 2010 Author Share Posted April 1, 2010 $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. Quote Link to comment https://forums.phpfreaks.com/topic/197197-why-doesnt-it-work-trying-to-execute-a-mysql-command-trying-to-echo/#findComment-1035084 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.