if/else statement on ajax success

I trying to get an counterstat for unread Messages:
The PHP-Code (BubbleStat.php) looks like this:

$totalMsg = $mysql->totalRows("SELECT msg_id from messages WHERE msg_opened = 0 AND msg_receiver = '".$_SESSION["ActiveUserSessionId"]."'");
    echo $totalMsgs;

The jQuery code i have this:

type: "POST",
url: '/BubbleStat.php',
cache: false,
success: function(html)

So how i can get the counter for unread Msgs in #Bubble_Msg ?
It would be nice if the Counter have’nt unread messages to hide the div #Bubble_Msg.

Any idea?

Leave a Reply


Hire Me
Follow Me!
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.