<?php
$package = $_POST['hp'];
$domain = $_POST['domain'];
$un = $_POST['un'];
$pw = $_POST['pw'];
$email = $_POST['email'];


$error = 'Setting up your account, please wait...';
include 'adjust.php';
include '../inc/sqlinf.php';
require 'execute.php';
$error = "Account created!";


include 'adjust.php';
$SQL = "SELECT * from FREEHOSTING";
$result = mysql_query( $SQL );
while( $row = mysql_fetch_array( $result ) ) {
include '../admin/query.php'; }
$error = "<div align=\"left\">
Domain : <b>$domain</b><br>
Username : <b>$un</b><br>
Password : <b>$pw</b><br>
An email has been sent to <b>$email</b> for your reference<br><br>
$message
</div>
";
include 'adjust.php';

$to="$email";
$headers.= "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; ";
$headers.= "charset=iso-8859-1\r\n";

$headers.= "From: $from";

$subject = "$subject";
$body = "
Domain : <b>$domain</b><br>
Username : <b>$un</b><br>
Password : <b>$pw</b><br><br>
$message
";

$send_check=mail($to,$subject,$body,$headers);
if ($send_check!=true) {
die();
}

$today  = strftime ("%B %d, %Y", mktime(0, 0, 0, date("m") , date("d"), date("Y")));

$sql = "INSERT INTO CLIENTS SET
PAYER_EMAIL ='$email' ,
USERNAME ='$un' ,
DOMAIN ='$domain' ,
CPW ='$pw' ,
PACKAGE ='Free Package' ,
SIGNUPDATE = '$today',
IG ='Free' ,
LASTPAYMENT = 'Free',
STATUS ='Active' ,
NEXTPAYMENT ='Free'";
$query = mysql_query($sql) or die("Cannot query the database.<br>" . mysql_error());
?>


