Error last to post

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

  • allan
    replied
    Thanks mate its working fine

    Leave a comment:


  • crazybrumi
    replied
    Originally posted by allan View Post
    $lpt=mysql_fetch_array(mysql_query("SELECT id, name FROM forumtopics WHERE fid='".$forum[0]."' ORDER BY lastpost DESC LIMIT 0,1"));
    $main.="Last Post:<a href=\"./viewtopic.php?thread=$lpt[0]&amp;go=last&amp;sid=$sid\">$lpt[1]</a>(<a href=\"./profile.php?who=$pinfo[0]&amp;sid=$sid\"$color>".getnick_uid($pinfo[0])."</a>)<br/>"; thats what iv got at the min mate
    Code:
    $sql=mysql_fetch_array(mysql_query("SELECT forumtopics.name,forumposts.uid,forumposts.thread FROM forumtopics 
       INNER JOIN forumposts on forumtopics.id = forumposts.thread ORDER BY forumposts.id DESC LIMIT 1"));
       $a = htmlspecialchars($sql[0]);
    
      $sex=mysql_fetch_array(mysql_query("SELECT sex FROM profiles WHERE uid='$sql[1]'"));
      if($sex[0]=="M"){$color=" style=\"color:#00CC33\"";}
      if($sex[0]=="F"){$color=" style=\"color:#FF0066\"";}
      if($sex[0]==""){}
    
      $c = "<a href=\"forums/viewtopic.php?thread=$sql[2]&amp;sid=$sid&amp;go=last\">$a</a>";
      $d = "<a href=\"profile.php?who=$sql[1]&amp;sid=$sid\"$color><b>".getnick_uid($sql[1])."</b></a>";
      
    $main.="Last post:  $c By $d<br/>\n";

    Leave a comment:


  • allan
    replied
    $lpt=mysql_fetch_array(mysql_query("SELECT id, name FROM forumtopics WHERE fid='".$forum[0]."' ORDER BY lastpost DESC LIMIT 0,1"));
    $main.="Last Post:<a href=\"./viewtopic.php?thread=$lpt[0]&amp;go=last&amp;sid=$sid\">$lpt[1]</a>(<a href=\"./profile.php?who=$pinfo[0]&amp;sid=$sid\"$color>".getnick_uid($pinfo[0])."</a>)<br/>"; thats what iv got at the min mate

    Leave a comment:


  • morse
    replied
    Code:
    $lpt[0]
    $pinfo[0]
    have you procurred the $lpt and $pinfo array data ??
    There must be somehing like
    $lpt = my_sql_array ..........
    $pinfo = my_sql_array ......
    make sure you add these before you echo your code

    Leave a comment:


  • allan
    replied
    $main.="Last Post: <a href=\"./fourms/viewtopic.php?thread=$lpt[0]&amp;go=last&amp;sid=$sid\">$lpt[1]</a>(<a href=\"../profile.php?who=$uid[0]&amp;sid=$nick\"$color>".getnick_uid($pinfo[0])."</a>)<br/>\n"; all iv got mate

    Leave a comment:


  • Mysterio
    replied
    how do you get the info from database? Post the code!

    Leave a comment:


  • allan
    replied
    the code iv useing comes up like this Last Post: () not showing what the last post was iv tried every thing to try fix it but nothing seems to work

    Leave a comment:


  • Mysterio
    replied
    can you be more clear?

    Leave a comment:


  • allan
    replied
    iv tried that mate it dnt work

    Leave a comment:


  • rap-4ever
    replied
    echo "Last Post: <a href=\"./viewtopic.php?thread=$lpt[0]&amp;go=last&amp;sid=$sid\">$lpt[1]</a>(<a href=\"../profile.php?who=$uid[0]&amp;sid=$nick\"$color>".getnick_uid($pinfo[0])."</a>)<br/>\n";

    lol

    Leave a comment:


  • allan
    started a topic Error last to post

    Error last to post

    Hi there can any one help with last to post for wapdesire v2 on last to post i cnt seem to get it working.

    $main.="Last Post: <a href=\"./viewtopic.php?thread=$lpt[0]&amp;go=last&amp;sid=$sid\">$lpt[1]</a>(<a href=\"../profile.php?who=$uid[0]&amp;sid=$nick\"$color>".getnick_uid($pinfo[0])."</a>)<br/>\n";

    i begreatful if any one can help
Working...
X