Web Analytics Made Easy -
StatCounter advice on refreshing incoming messages with mt_rand()?? - CodingForum

Announcement

Collapse
No announcement yet.

advice on refreshing incoming messages with mt_rand()??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resolved advice on refreshing incoming messages with mt_rand()??

    is this a good way of doing it? or should i use a date time stamp with seconds rather?

    while i am on a page, the new message must come through without me refreshing the page

    my code is written in php:
    Code:
    echo "<tr>";
        $date = add_date($msg->getCreatedAt(),$hr=2);
    	echo "<td class='td_show_contact_item' align='left'>".$date."</td>";
        $opened_once = $msg->getOpenedOnce();
        if($opened_once >= 1)
        {
           echo "<td class='td_show_contact_item' align='left'>".link_to($msg->getSubject(),   'messagebox/read?cursor='.$cursor,'class=link_medium_blue')."</td>";
        }    
        else
        { ?>
           <td align='left'>
             <a href="<?php echo url_for('messagebox/read?cursor=').$cursor ?>" style='color:#ff0000 !important' class='spn_small_red_rbc'><?php echo $msg->getSubject();?></a>        
           </td>      
        <?php 
        } 
     	echo "<td class='td_show_contact_item' align='left'>".$unique_code_from." ( $block_url )</td>";
        echo "</tr>";
        ++$cursor;
    can anyone give some advise please? thank you
    Last edited by helloise; Aug 18, 2011, 07:29 AM.
Working...
X