added.php
ASCII English text
<a href="index.php">Back to List</a>
<?php
/// In order to use this script freely
/// you must leave the following copyright
/// information in this file:
/// Copyright 2006
www.turningturnip.co.uk
/// All rights reserved.
include("connect.php");
$clan = trim($_POST['clan']);
$a = trim($_POST['a']);
$b = trim($_POST['b']);
$c = trim($_POST['c']);
$d = trim($_POST['d']);
$e = trim($_POST['e']);
$f = trim($_POST['f']);
$g = trim($_POST['g']);
$h = trim($_POST['h']);
$j = trim($_POST['j']);
$k = trim($_POST['k']);
$l = trim($_POST['l']);
$m = trim($_POST['m']);
$n = trim($_POST['n']);
$o = trim($_POST['o']);
$p = trim($_POST['p']);
$q = trim($_POST['q']);
$r = trim($_POST['r']);
$s = trim($_POST['s']);
$t = trim($_POST['t']);
$query = "INSERT INTO vita (id, clan, a, b, c, d, e, f, g, h, j, k, l, m, n, o, p, q, r, s, t)
VALUES ('', '$clan', '$a', '$b', '$c', '$d', '$e', '$f', '$g', '$h', '$j', '$k', '$l', '$m', '$n', '$o', '$p', '$q', '$r', '$s', '$t')";
$results = mysql_query($query);
if ($results)
{
echo "Details added.";
}
mysql_close();
?>
and here is my connect.php
<?php
/// For the following details,
/// please contact your server vendor
$hostname='localhost'; //// specify host, i.e. 'localhost'
$user='th3dj_admin'; //// specify username
$pass='******'; //// specify password
$dbase='th3dj_hud'; //// specify database name
$connection = mysql_connect("$hostname" , "$user" , "$pass")
or die ("Can't connect to MySQL");
$db = mysql_select_db($dbase , $connection) or die ("Can't select database.");