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

    Latest Awards:

    Exclamation Can someone make this for me!

    It should only take an expert like a few minutes to do this.

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


    that is an example

    i want the working thing.

    Reply or PM me.

    Thankyou!

    xxxxxx
    Last edited by Bonxy; 29-05-2008 at 03:58 PM.
    *hi*


    Edited by Bonxy



  2. #2
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Make a database and user and run this query:
    PHP Code:
    CREATE TABLE IF NOT EXISTS `inputs` (
      `
    input1text NOT NULL,
      `
    input2text NOT NULL,
      `
    input3text NOT NULL,
      `
    input4text NOT NULL,
      `
    input5text NOT NULL,
      `
    input6text NOT NULL,
      `
    input7text NOT NULL,
      `
    input8text NOT NULL,
      `
    input9text NOT NULL,
      `
    input10text NOT NULL,
      `
    input11text NOT NULL,
      `
    input12text NOT NULL,
      `
    input13text NOT NULL,
      `
    input14text NOT NULL,
      `
    input15text NOT NULL,
      `
    input16text NOT NULL,
      `
    input17text NOT NULL,
      `
    input18text NOT NULL,
      `
    input19text NOT NULL,
      `
    input20text NOT NULL
    ENGINE=MyISAM DEFAULT CHARSET=latin1;

    INSERT INTO `inputs` (`input1`, `input2`, `input3`, `input4`, `input5`, `input6`, `input7`, `input8`, `input9`, `input10`, `input11`, `input12`, `input13`, `input14`, `input15`, `input16`, `input17`, `input18`, `input19`, `input20`) VALUES
    ('1''2''3''4''5''6''7''8''9''10''11''12''13''14''15''16''17''18''19''20'); 
    Now make the following pages:
    config.php
    display.php
    submit.php

    I haven't added any validation, you will have to add it you self.

    config.php
    PHP Code:
    <?php
    $hostname 
    = ("localhost");
    $database = ("database");
    $username = ("username");
    $password = ("password");
    @
    mysql_connect($hostname$username$password)
    or exit(
    "MySQL Connection Error");
    @
    mysql_selectdb($database)
    or exit(
    "MySQL Database Selection Error, please check your details!");
    ?>
    display.php
    PHP Code:
    <?php
    include("config.php");
    $sql mysql_query("SELECT * FROM `inputs`");
    $fetch mysql_fetch_array($sql);
    echo(
    "
    $fetch[input1]<br>
    $fetch[input2]<br>
    $fetch[input3]<br>
    $fetch[input4]<br>
    $fetch[input5]<br>
    $fetch[input6]<br>
    $fetch[input7]<br>
    $fetch[input8]<br>
    $fetch[input9]<br>
    $fetch[input10]<br>
    $fetch[input11]<br>
    $fetch[input12]<br>
    $fetch[input13]<br>
    $fetch[input14]<br>
    $fetch[input15]<br>
    $fetch[input16]<br>
    $fetch[input17]<br>
    $fetch[input18]<br>
    $fetch[input19]<br>
    $fetch[input20]");
    ?>
    submit.php
    PHP Code:
    <?php
    include("config.php");
    if(
    $_GET["act"] == "submit") {
    echo(
    "Saved");
        
    $input1 $_POST["input1"];
        
    $input2 $_POST["input2"];
        
    $input3 $_POST["input3"];
        
    $input4 $_POST["input4"];
        
    $input5 $_POST["input5"];
        
    $input6 $_POST["input6"];
        
    $input7 $_POST["input7"];
        
    $input8 $_POST["input8"];
        
    $input9 $_POST["input9"];
        
    $input10 $_POST["input10"];
        
    $input11 $_POST["input11"];
        
    $input12 $_POST["input12"];
        
    $input13 $_POST["input13"];
        
    $input14 $_POST["input14"];
        
    $input15 $_POST["input15"];
        
    $input16 $_POST["input16"];
        
    $input17 $_POST["input17"];
        
    $input18 $_POST["input18"];
        
    $input19 $_POST["input19"];
        
    $input20 $_POST["input20"];
            
    mysql_query("UPDATE `inputs` SET `input1` = '$input1', `input2` = '$input2', `input3` = '$input3', `input4` = '$input4', `input5` = '$input5', `input6` = '$input6', `input7` = '$input7', `input8` = '$input8', `input9` = '$input9', `input10` = '$input10', `input11` = '$input11', `input12` = '$input12', `input13` = '$input13', `input14` = '$input14', `input15` = '$input15', `input16` = '$input16', `input17` = '$input17', `input18` = '$input18', `input19` = '$input19', `input20` = '$input20'");
    } else {
            
    $sql mysql_query("SELECT * FROM `inputs`");
            
    $fetch mysql_fetch_array($sql);
    echo(
    "<form method=\"POST\" action=\"?act=submit\">
        <p>
        Input 1: <input type=\"text\" name=\"input1\" value=\"
    $fetch[input1]\" size=\"20\"><br>
        Input 2: <input type=\"text\" name=\"input2\" value=\"
    $fetch[input2]\" size=\"20\"><br>
        Input 3: <input type=\"text\" name=\"input3\" value=\"
    $fetch[input3]\" size=\"20\"><br>
        Input 4: <input type=\"text\" name=\"input4\" value=\"
    $fetch[input4]\" size=\"20\"><br>
        Input 5: <input type=\"text\" name=\"input5\" value=\"
    $fetch[input5]\" size=\"20\"><br>
        Input 6: <input type=\"text\" name=\"input6\" value=\"
    $fetch[input6]\" size=\"20\"><br>
        Input 7: <input type=\"text\" name=\"input7\" value=\"
    $fetch[input7]\" size=\"20\"><br>
        Input 8: <input type=\"text\" name=\"input8\" value=\"
    $fetch[input8]\" size=\"20\"><br>
        Input 9: <input type=\"text\" name=\"input9\" value=\"
    $fetch[input9]\" size=\"20\"><br>
        Input 10: <input type=\"text\" name=\"input10\" value=\"
    $fetch[input10]\" size=\"20\"><br>
        Input 11: <input type=\"text\" name=\"input11\" value=\"
    $fetch[input11]\" size=\"20\"><br>
        Input 12: <input type=\"text\" name=\"input12\" value=\"
    $fetch[input12]\" size=\"20\"><br>
        Input 13: <input type=\"text\" name=\"input13\" value=\"
    $fetch[input13]\" size=\"20\"><br>
        Input 14: <input type=\"text\" name=\"input14\" value=\"
    $fetch[input14]\" size=\"20\"><br>
        Input 15: <input type=\"text\" name=\"input15\" value=\"
    $fetch[input15]\" size=\"20\"><br>
        Input 16: <input type=\"text\" name=\"input16\" value=\"
    $fetch[input16]\" size=\"20\"><br>
        Input 17: <input type=\"text\" name=\"input17\" value=\"
    $fetch[input17]\" size=\"20\"><br>
        Input 18: <input type=\"text\" name=\"input18\" value=\"
    $fetch[input18]\" size=\"20\"><br>
        Input 19: <input type=\"text\" name=\"input19\" value=\"
    $fetch[input19]\" size=\"20\"><br>
        Input 20: <input type=\"text\" name=\"input20\" value=\"
    $fetch[input20]\" size=\"20\"></p>
        <p><input type=\"submit\" value=\"Submit\" name=\"submit\"></p>
    </form>"
    );
    }
    ?>
    Should work

    Demo:
    http://habbcrazy.net/demo/
    Last edited by Moh; 29-05-2008 at 04:35 PM.

  3. #3
    Join Date
    Jun 2005
    Posts
    2,688
    Tokens
    0

    Latest Awards:

    Default

    Code:
    CREATE TABLE `input` (
      `link` varchar(255) NOT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    Table

    config.php

    PHP Code:
    <?php
    mysql_connect
    ('localhost','user','pass');
    mysql_select_db('dbname');
    ?>
    admin.php
    PHP Code:
    <?php
    include('config.php');
    if(isset(
    $_POST['submit'])){
        
        
    $sql="delete from input";
        
    $result mysql_query($sql); if(!$result) die(mysql_error());
        
        
    $i=0;
        while(
    $i<count($_POST['inputs'])){
            
    $sql="insert into input(link) values('".addslashes($_POST['inputs'][$i])."')";
            
    $result=mysql_query($sql); if(!$result) die(mysql_error());
            
    $i++;
        }
    }

    $totalboxes=20;
    $totalcount=1;

    echo 
    '<form method="POST">';

    $sql="select link from input";
    $result mysql_query($sql); if(!$result) die(mysql_error());
    while(
    $link=mysql_fetch_array($result)){
        echo 
    'Input '.$totalcount.': <input type="text" name="inputs[]" value="'.stripslashes($link['link']).'"><br/>';
        
    $totalcount++;
    }

    if(
    $totalcount<$totalboxes){
        
    $i=$totalcount;
        while(
    $i<=$totalboxes){
            echo 
    'Input '.$i.': <input type="text" name="inputs[]" value=""><br/>';
            
    $i++;
        }
    }

    echo 
    '<br/><input type="submit" name="submit" value="Update Links"></form>';

    ?>
    display.php

    PHP Code:
    <?php
    include('config.php');

    $sql="select link from input";
    $result=mysql_query($sql); if(!$result) die(mysql_error());
    while(
    $input mysql_fetch_array($result)){
    echo 
    stripslashes(htmlentities($input['link']));
    }
    ?>
    Last edited by Baving; 29-05-2008 at 04:48 PM.

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

    Latest Awards:

    Default

    thankyou guys

    xx
    *hi*


    Edited by Bonxy



Posting Permissions

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