Rep message on main page

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

    Rep message on main page

    Hey guys im having lil prob with a code that i have everything are well in the code i have after updating the image and message it must show on main page like the following but it dont show anything

    [rep icon] - Username (msg)

    i dnt know where i done wrong here are my useage code
    Code:
    $daytm = 7*60;
    
      $reptime = time() - $daytm;
    
      $rminfo = mysql_fetch_array (mysql_query("SELECT id, name, ficon, fmsg FROM ibwf_users WHERE reputation>='50' AND ficon!='' AND fmsg!='' AND lastact>'".$reptime."' ORDER BY RAND() LIMIT 1"));
    
      //if(isbanned($rminfo[0]) $rminfo[0] = 0;
    
      if($rminfo[0]>0)
    
      {
    
    mysql_query("UPDATE ibwf_users SET ruse=ruse+1 WHERE id='".$rminfo[0 ]."' LIMIT 1");
    echo "
    <img src=\"$rminfo[2]\" height=\"40\" width=\"45\" alt=\"R.\"/><br/>
    <a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$rminfo[0]\"> $rminfo[1]</a> (".htmlspecialchars($rminfo[3]).")<br/>";
    
    }

    #2
    Originally posted by riderz View Post
    Hey guys im having lil prob with a code that i have everything are well in the code i have after updating the image and message it must show on main page like the following but it dont show anything

    [rep icon] - Username (msg)

    i dnt know where i done wrong here are my useage code
    Code:
    $daytm = 7*60;
    
      $reptime = time() - $daytm;
    
      $rminfo = mysql_fetch_array (mysql_query("SELECT id, name, ficon, fmsg FROM ibwf_users WHERE reputation>='50' AND ficon!='' AND fmsg!='' AND lastact>'".$reptime."' ORDER BY RAND() LIMIT 1"));
    
      //if(isbanned($rminfo[0]) $rminfo[0] = 0;
    
      if($rminfo[0]>0)
    
      {
    
    mysql_query("UPDATE ibwf_users SET ruse=ruse+1 WHERE id='".$rminfo[0 ]."' LIMIT 1");
    echo "
    <img src=\"$rminfo[2]\" height=\"40\" width=\"45\" alt=\"R.\"/><br/>
    <a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$rminfo[0]\"> $rminfo[1]</a> (".htmlspecialchars($rminfo[3]).")<br/>";
    
    }
    i think its ya sql? Namely
    $rminfo = mysql_fetch_array (mysql_query("SELECT id, name, ficon, fmsg FROM ibwf_users WHERE reputation>'49' AND ficon IS NOT NULL AND fmsg IS NOT NULL AND lastact>'".$reptime."' ORDER BY RAND() LIMIT 1"));

    Comment


      #3
      this is my sql in ibwf_users
      Code:
       `ruse` int(100) NOT NULL default '0',
        `ficon` varchar(50) NOT NULL default '',
        `reputation` int(100) NOT NULL default '0',
        `fmsg` varchar(50) NOT NULL default '',
          `reps` int(10) NOT NULL default '0',

      Comment


        #4
        Originally posted by riderz View Post
        Hey guys im having lil prob with a code that i have everything are well in the code i have after updating the image and message it must show on main page like the following but it dont show anything

        [rep icon] - Username (msg)

        i dnt know where i done wrong here are my useage code
        Code:
        $daytm = 7*60;
        
          $reptime = time() - $daytm;
        
          $rminfo = mysql_fetch_array (mysql_query("SELECT id, name, ficon, fmsg FROM ibwf_users WHERE reputation>='50' AND ficon!='' AND fmsg!='' AND lastact>'".$reptime."' ORDER BY RAND() LIMIT 1"));
        
          //if(isbanned($rminfo[0]) $rminfo[0] = 0;
        
          if($rminfo[0]>0)
        
          {
        
        mysql_query("UPDATE ibwf_users SET ruse=ruse+1 WHERE id='".$rminfo[0 ]."' LIMIT 1");
        echo "
        <img src=\"$rminfo[2]\" height=\"40\" width=\"45\" alt=\"R.\"/><br/>
        <a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$rminfo[0]\"> $rminfo[1]</a> (".htmlspecialchars($rminfo[3]).")<br/>";
        
        }
        maybe ur reputation or ur ficon or ur fmsg or ur lastact is against all in rminfo..lol..or any of it..too many requirements..hard to get it that's why it doesn't appear..Any of them falses will return the script false and will not show it..
        Last edited by kiLLeR-eyEd_14; 20.08.09, 22:37.
        My Blog: http://jhommark.blogspot.com
        My Facebook: http://www.facebook.com/jhommark
        My Official Site: http://www.undergroundweb.tk
        My Community Site: http://undergroundwap.xtreemhost.com

        Comment


          #5
          try:
          Code:
          $daytm = 7*60;
          $reptime = time() - $daytm;
          $rminfos = mysql_query("SELECT id, name, ficon, fmsg FROM ibwf_users WHERE reputation>='50' AND ficon!='' AND fmsg!='' AND lastact>'".$reptime."' ORDER BY RAND() LIMIT 1");
          while ($rminfo = mysql_fetch_array($rminfos)){
          mysql_query("UPDATE ibwf_users SET ruse=ruse+1 WHERE id='".$rminfo[0 ]."'");
          echo "
          <img src=\"$rminfo[2]\" height=\"40\" width=\"45\" alt=\"R.\"/><br/>
          <a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$rminfo[0]\"> $rminfo[1]</a> (".htmlspecialchars($rminfo[3]).")<br/>";
          }
          Last edited by something else; 21.08.09, 20:15.

          Comment


            #6
            still dnt display anything

            Comment


              #7
              sorry i edited it above lol

              Comment


                #8
                tried it but still no response seems like it dnt won work with me hehe

                Comment


                  #9
                  Maybe u havent dump datas so n0thng w0nt show but the codes are correct try check the data when adding items etc
                  com site: http://vampist.net
                  download site: http://wapdloads.net
                  fb: http://www.facebook.com/pmplx

                  Comment

                  Working...
                  X