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 5 of 5
  1. #1
    Join Date
    Nov 2006
    Location
    Boro
    Posts
    841
    Tokens
    1,650

    Latest Awards:

    Exclamation can someone make this please!!!!!!!!!!!

    Can anyone make this for me...


    i want just a list on 10 on/off buttons with the php to show them...in a mysql database aswell

    here is a crappy example:

    http://www.bonxy.co.uk/habbo/options.php

    Reply below or PM me!
    *hi*


    Edited by Bonxy



  2. #2
    Join Date
    Jul 2005
    Location
    Cymru! :o Bahh
    Posts
    571
    Tokens
    0

    Default

    so you want a panel to turn on/off the message, and to show a message in an alert box?
    I'll get to work on it, should take me like 5 mins.
    Last edited by kreechin; 02-06-2008 at 08:44 PM.

    So A Kiss Is Out Of The Question Then..?

    ♥ My Boy <sinlge> Tbh ♥
    This love isn't good unless it's me and you
    Complicated is the whole point. x

    Theres nothing scarier than getting something you want because then you have something to lose..





  3. #3
    Join Date
    Jul 2005
    Location
    Cymru! :o Bahh
    Posts
    571
    Tokens
    0

    Default

    can't edit my post so;
    something like this?
    http://free-host.ath.cx/alert/form.php - the form
    http://free-host.ath.cx/alert/alert.php - the alert

    So A Kiss Is Out Of The Question Then..?

    ♥ My Boy <sinlge> Tbh ♥
    This love isn't good unless it's me and you
    Complicated is the whole point. x

    Theres nothing scarier than getting something you want because then you have something to lose..





  4. #4
    Join Date
    Nov 2006
    Location
    Boro
    Posts
    841
    Tokens
    1,650

    Latest Awards:

    Default

    ye... is tht a mysql version tho ?
    *hi*


    Edited by Bonxy



  5. #5
    Join Date
    Jul 2005
    Location
    Cymru! :o Bahh
    Posts
    571
    Tokens
    0

    Default

    It is yeah
    I can't work with flat file

    You know how to make a config file I assume?
    alert.php or w.e
    Code:
    <?php
    Include ("config.php");
    $query  = ("SELECT * FROM alert");
    $result = mysql_query($query);
    while($row = mysql_fetch_array($result, MYSQL_ASSOC))
    {
    if ($row[status] == 1) {
    echo ("<SCRIPT language='JavaScript'>  
    alert('Message From Your Site Here Staff: $row[message]');  
    </SCRIPT>");
    } else {
    echo ("no alert to show, alerts disabled");
    }
    }
    ?>
    form.php or w.e
    Code:
    <?
    include "config.php";
    if (isset($_POST[submit])) {
    $status = $_POST[status];
    $message = $_POST[message];
    $update = mysql_query("UPDATE alert SET status = '".$status."', message = '".$message."' WHERE id = '1'") 
    or die(mysql_error());
    echo ("Alert Preferences Updated!");
    } else {
    echo ("
    <form method='POST' style='text-align: center'>
    	<p><select size='1' name='status'>
    	<option value='1' selected>On</option>
    	<option value='0'>Off</option>
    	</select></p>
    	<p><textarea rows='2' name='message' cols='20'></textarea></p>
    	<p><input type='submit' value='Update Status' name='submit'></p>
    </form>");
    }
    ?>
    mysql table shizz
    Code:
    CREATE TABLE `alert` (
      `id` int(33) NOT NULL default '1',
      `status` int(33) NOT NULL default '0',
      `message` varchar(255) NOT NULL default ''
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    -- 
    -- Dumping data for table `alert`
    -- 
    
    INSERT INTO `alert` VALUES (1, 1, 'Hmm. :)');
    Last edited by kreechin; 02-06-2008 at 09:55 PM.

    So A Kiss Is Out Of The Question Then..?

    ♥ My Boy <sinlge> Tbh ♥
    This love isn't good unless it's me and you
    Complicated is the whole point. x

    Theres nothing scarier than getting something you want because then you have something to lose..





Posting Permissions

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