Web Analytics Made Easy -
StatCounter Java Help Please - CodingForum

Announcement

Collapse
No announcement yet.

Java Help Please

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

  • Java Help Please

    I have my own heavily hacked forums, and they run extremely well on phpbb2:06.
    I also have a php driven chatroom called PHP Chatengine version 1.9.
    I would like a script that would show who is in the chatroom now on my php forums index page at the bottom where the chatbox is.
    I do have chatbox installed and as this shows who is in the chat, I wanted the other chatroom to show the same thing.
    The chatroom is not intergrated into my forums, so seperate registration is required to join in on chat.

    I did try and install a small script which I got from the original site that allows you to download this chat software, this script is suppose to show who is in the chat now, on your index page, but I can`t get it to work.

    This is the script you are suppose to insert somewhere on the page
    <?
    $mysql_link= mysql_connect("localhost", "username", "password");
    mysql_select_db("databasename", $mysql_link);
    $query = "SELECT login FROM chat_session_ids WHERE status_online <> 99 ORDER BY login ASC;";
    $result = mysql_query($query, $mysql_link);
    while ($record = mysql_fetch_array($result))
    {
    print($record["login"]."<br>");
    }
    ?>
    I have tried this and it does not show any users in chat, all I see and anyone else is this
    "); } ?>
    I have completed all the details in the script for my database, but nothing works.

    Can anyone help and explain why it don`t work.
    For more info on the chatroom itself you can find it here http://www.mipamedia.com/ This might give you some idea what I am trying to explain.
    I realy need some help with this please, if anyone can explain how I place who is in the chatroom on my forums index page.

    Many Thanks In Advance

  • #2
    This is php, not java

    Comment


    • #3
      well there ye go I don`t know my php from my java, sorry I should have stated it`s php, sorry been reading books on java scripting, and should have placed in the php forum.
      I am extremely sorry, dare say the moderators will move it.
      My Apologise

      Does this mean that noone can help me hear anyway.

      Comment


      • #4
        Well from the little bit of code you've shown, I see no error and don't see how or why you're seeing the end of the script. I know this won't be the error, but sometimes you'll get given a parse error for having the semi-colon inside your query.
        PHP Code:
        $query "SELECT login FROM chat_session_ids WHERE status_online <> 99 ORDER BY login ASC;"
        Take the one out just after ASC

        Did the script upload fully? You might want to try uploading it again. Apart from that I can't think of any reason

        Comment

        Working...
        X