<?php
include '../../inc/sqlinf.php';

$a = $_POST['1'];
$b = $_POST['2'];
$c = $_POST['3'];
$d = $_POST['4'];
$e = $_POST['5'];
$f = $_POST['6'];
$g = $_POST['7'];
$h = $_POST['8'];
$i = $_POST['9'];
$j = $_POST['10'];
$k = $_POST['11'];
$l = $_POST['12'];
$m = $_POST['13'];

if ($edit == 'tru') {

$v ="UPDATE $which SET";
$w =" WHERE ID = '$id'";

}else{

$SQL = "SELECT * from HOSTINGPACKAGES WHERE WHMNAME='$b'";
$result = mysql_query( $SQL );
while( $row = mysql_fetch_array( $result ) ) {
include '../query.php'; }

if (empty($whmname)) {} else {
$error = "This hosting package has already been used with : <b>$name</b>, select a different package (WHM Name)";
include '../../adjust.php';die();}

$v ="INSERT INTO $which SET";
$w = $nil;
}

$sql = "$v
NAME ='$a',
WHMNAME='$b',
MONTHLY='$c',
QUARTERLY='$d',
SEMIANNUALLY='$e',
ANNUALLY='$f',
2YEARS='$g',
FREETRIAL='$h',
YY='$i',
SUBJECT='$k',
FROOM='$l',
MESSAGE='$m',
NN='$j'
$w
";
$query = mysql_query($sql) or die("Cannot query the database.<br>" . mysql_error());

$variable = "../$return.php";
include '../resend.php';
?>
