PDA

View Full Version : Can someone make this for me!



Bonxy
29-05-2008, 03:55 PM
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

Moh
29-05-2008, 04:32 PM
Make a database and user and run this query:

CREATE TABLE IF NOT EXISTS `inputs` (
`input1` text NOT NULL,
`input2` text NOT NULL,
`input3` text NOT NULL,
`input4` text NOT NULL,
`input5` text NOT NULL,
`input6` text NOT NULL,
`input7` text NOT NULL,
`input8` text NOT NULL,
`input9` text NOT NULL,
`input10` text NOT NULL,
`input11` text NOT NULL,
`input12` text NOT NULL,
`input13` text NOT NULL,
`input14` text NOT NULL,
`input15` text NOT NULL,
`input16` text NOT NULL,
`input17` text NOT NULL,
`input18` text NOT NULL,
`input19` text NOT NULL,
`input20` text 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
$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
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
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 :P

Demo:
http://habbcrazy.net/demo/

Baving
29-05-2008, 04:46 PM
CREATE TABLE `input` (
`link` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Table

config.php



<?php
mysql_connect('localhost','user','pass');
mysql_select_db('dbname');
?>


admin.php


<?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
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']));
}
?>

Bonxy
29-05-2008, 05:41 PM
thankyou guys

xx

Want to hide these adverts? Register an account for free!