Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Sep 2006
    Posts
    450
    Tokens
    0

    Default Think with me ;D

    Well basically i will be making a chat.

    I was thinking that on the submit message bit too mute the room i could do something like this:

    PHP Code:
    <?
    if($_POST['message'] == ':room_shutup'){
    $update=mysql_query(UPDATE `chatset `mute'1'))
    }else{
    Add chat message here.
    ?>
    obviously the code above is not right right at all but you should understand that if you type :room_shutup it sets mute in the mysql to 1 which would mean no one called talk.

    But i was wondering how i could type like :mute_USERNAME and make it set the mysql update in there name bit to 1 on mute so they cant talk.

    Thanks, if you understand!

  2. #2
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    I understand what your saying. Im sure it would be the same as for example styling a username colour depending on the level. Im not 100% sure if you could edit the SQL from outside your program.

    I highly doubt this will help at all but oh well.
    I want to sound like I know what im talking about


    You don't like me
    Chances are I don't like you.

  3. #3
    Join Date
    Nov 2004
    Location
    HabboWeb FM Offices
    Posts
    3,019
    Tokens
    0

    Latest Awards:

    Default

    On the PHP script get the user name (like $user = GET CODE HERE) then you could have a scroll down thing with mute on, then if they select mute it gets the
    username out of the field then you could have $update=mysql_query(UPDATE `$user` set `mute` '1')) like that, but they have to be fully registered.

  4. #4
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    Yep. Thats what it is. I was trying to think as I was sure I did something like that before but couldn't remember.


    You don't like me
    Chances are I don't like you.

  5. #5
    Join Date
    Sep 2006
    Posts
    450
    Tokens
    0

    Default

    But i need it without the drop down menu.

    I have seen it done before just don't know how, is there a way to like ignore ':mute' ?

  6. #6
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    You could most likely put in 1 form and make it edit the SQL details to mute the username i the box


    You don't like me
    Chances are I don't like you.

  7. #7
    Join Date
    Sep 2006
    Posts
    450
    Tokens
    0

    Default

    Don't get it
    :{

  8. #8
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    You have a form and you type in the username. That sends a request to the SQL to edit the mute level to 1 so he/she cannot be heard


    You don't like me
    Chances are I don't like you.

  9. #9
    Join Date
    Sep 2006
    Posts
    450
    Tokens
    0

    Default

    Guess i will have to use a dropdown.

  10. #10
    Join Date
    Nov 2004
    Location
    HabboWeb FM Offices
    Posts
    3,019
    Tokens
    0

    Latest Awards:

    Default

    or, you have a button which they press with mute, and it shows a little popup box and they enter the name?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •