Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 6 of 6

Thread: Quick Question

  1. #1
    Join Date
    Dec 2006
    Location
    Kent, UK
    Posts
    627
    Tokens
    138
    Habbo
    Romanity

    Latest Awards:

    Default Quick Question

    If i had a box in which you could select multiple answers... not the check boxes but a multiple drop down thingy if you know what i mean.

    For the array of the options they choose or w.e

    Would i do it as

    $group = array($_POST[group]);

    Or is it more complex?

    and then to select the users to send it

    ("SELECT * FROM `users` WHERE `level` = '$group'");

    Would that all work?

  2. #2
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Hmm i wondered this too.. I know how to do multiple checkboxes but im not sure about that one.

    maybe a foreach?

  3. #3
    Join Date
    Dec 2006
    Location
    Kent, UK
    Posts
    627
    Tokens
    138
    Habbo
    Romanity

    Latest Awards:

    Default

    mmmm... Ill try it, otherwise ill look it up on php.net or something.

  4. #4
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    You mean a options thing for all the groups?

    Just repeat it..

    PHP Code:
    <?
    echo "<select size='1' name='group'>";
    $result mysql_query("SELECT * FROM `groups`");
    while(
    $groupmysql_fetch_array($result)) {
    $group $sql["NAMEORWHATEVERDEFINESTHEUSERGROUPNAME"];
    echo 
    "<option value=$group>$group</option>";
    }
    echo 
    "</select>";
    ?>
    Then you would use

    PHP Code:
    $query mysql_query("INSERT INTO `WHATEVER` ( `WHATEVER`) VALUES ('WHATEVER')"); 
    Edit: If thats not what ur looking for, tell me and I will try to help again.
    Last edited by Blob; 05-01-2007 at 04:16 PM.

  5. #5
    Join Date
    Dec 2006
    Location
    Kent, UK
    Posts
    627
    Tokens
    138
    Habbo
    Romanity

    Latest Awards:

    Default

    Not like a normal drop down, you know one where you can select multiple options...

  6. #6
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Quote Originally Posted by The_Emos View Post
    Not like a normal drop down, you know one where you can select multiple options...
    Dunno that code sorry.

Posting Permissions

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