Jump to content

[SOLVED] Help with code!


steviez

Recommended Posts

Hi,

 

I am trying to get my site to show when someone has posted a comment, with the code i have done even if its been read it still shows new.

 

Here is my code:

 

<?php
// Check For New Comments
$query = "SELECT profilecomment_id FROM se_profilecomments WHERE read_status='0' AND profilecomment_user_id='" . $user->user_info[user_id] . "'";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
if($num_rows){
$smarty->assign("new_comments", "1");
}
?>

and on my page i have:

[code]
{if $new_comments eq "1"}
do this
{/if}

 

any ideas?

[/code]

Link to comment
https://forums.phpfreaks.com/topic/88393-solved-help-with-code/
Share on other sites

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.