<?php
error_reporting(E_ALL);
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
//$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) {
$insertSQL = sprintf("INSERT INTO plus_signup (terms, prop_id, StartDate, weeks, EndDate, Title, userid, password, sex, DOBDate, DOBMonth, DOBYear, Nationality, `Marital Status`, PhoneDay, PhoneEvening, PhoneMobile, email, Smoker, NextKin, CurrentAddress, PrevAddress, LivingStatus, Student, BankFinCCJ, BankFinArrears, BankFinBankR, BankFinNone, BankName, BankAccNum, BankSortCode, BankDuration, BankDCard, BankElectoral, LLName, LLTele, LLEmail, LLHost, LLAddress, GuName, GuTitle, GuDobDate, GuDobMonth, GuDobYear, GuSex, GuMarital, GuPhoneDay, GuPhoneEven, GuPhoneMob, GuPhoneEmail, GuCurrentAdd, GuPrevAdd, GuBankName, GuBankAccNu, GuBankSort, GuBankDurat, GuBankDebit, GuBankElect, GuEmpProffes, GuEmpAnnWa, GuEmpPayroll, GuSelfEmp, GuHaveAcc, GuAccName, GuAccContName, GuAccAdd, GuAccDayTel, GuAccMobTel, GuAccEmail, GuAccAdditional, GuEmployerNam, GuEmployerAdd, GuEmployerContactName, GuEmployerTele, GuEmployerEmail, GuEmployerCCj, GuEmployerArr, GuEmployerBankR, GuEmployerNone) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString(isset($_POST['terms']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString($_POST['prop_id'], "text"),
GetSQLValueString($_POST['StartDate'], "text"),
GetSQLValueString($_POST['weeks'], "text"),
GetSQLValueString($_POST['EndDate'], "text"),
GetSQLValueString($_POST['Title'], "text"),
GetSQLValueString($_POST['userid'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['sex'], "text"),
GetSQLValueString($_POST['DOBDate'], "text"),
GetSQLValueString($_POST['DOBMonth'], "text"),
GetSQLValueString($_POST['DOBYear'], "text"),
GetSQLValueString($_POST['Nationality'], "text"),
GetSQLValueString($_POST['Marital_Status'], "text"),
GetSQLValueString($_POST['PhoneDay'], "text"),
GetSQLValueString($_POST['PhoneEvening'], "text"),
GetSQLValueString($_POST['PhoneMobile'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['Smoker'], "text"),
GetSQLValueString($_POST['NextKin'], "text"),
GetSQLValueString($_POST['CurrentAddress'], "text"),
GetSQLValueString($_POST['PrevAddress'], "text"),
GetSQLValueString($_POST['LivingStatus'], "text"),
GetSQLValueString($_POST['Student'], "text"),
GetSQLValueString(isset($_POST['BankFinCCJ']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString(isset($_POST['BankFinArrears']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString(isset($_POST['BankFinBankR']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString(isset($_POST['BankFinNone']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString($_POST['BankName'], "text"),
GetSQLValueString($_POST['BankAccNum'], "text"),
GetSQLValueString($_POST['BankSortCode'], "text"),
GetSQLValueString($_POST['BankDuration'], "text"),
GetSQLValueString($_POST['BankDCard'], "text"),
GetSQLValueString($_POST['BankElectoral'], "text"),
GetSQLValueString($_POST['LLName'], "text"),
GetSQLValueString($_POST['LLTele'], "text"),
GetSQLValueString($_POST['LLEmail'], "text"),
GetSQLValueString($_POST['LLHost'], "text"),
GetSQLValueString($_POST['LLAddress'], "text"),
GetSQLValueString($_POST['GuName'], "text"),
GetSQLValueString($_POST['GuTitle'], "text"),
GetSQLValueString($_POST['GuDobDate'], "text"),
GetSQLValueString($_POST['GuDobMonth'], "text"),
GetSQLValueString($_POST['GuDobYear'], "text"),
GetSQLValueString($_POST['GuSex'], "text"),
GetSQLValueString($_POST['GuMarital'], "text"),
GetSQLValueString($_POST['GuPhoneDay'], "text"),
GetSQLValueString($_POST['GuPhoneEven'], "text"),
GetSQLValueString($_POST['GuPhoneMob'], "text"),
GetSQLValueString($_POST['GuPhoneEmail'], "text"),
GetSQLValueString($_POST['GuCurrentAdd'], "text"),
GetSQLValueString($_POST['GuPrevAdd'], "text"),
GetSQLValueString($_POST['GuBankName'], "text"),
GetSQLValueString($_POST['GuBankAccNu'], "text"),
GetSQLValueString($_POST['GuBankSort'], "text"),
GetSQLValueString($_POST['GuBankDurat'], "text"),
GetSQLValueString($_POST['GuBankDebit'], "text"),
GetSQLValueString($_POST['GuBankElect'], "text"),
GetSQLValueString($_POST['GuEmpProffes'], "text"),
GetSQLValueString($_POST['GuEmpAnnWa'], "text"),
GetSQLValueString($_POST['GuEmpPayroll'], "text"),
GetSQLValueString($_POST['GuSelfEmp'], "text"),
GetSQLValueString($_POST['GuHaveAcc'], "text"),
GetSQLValueString($_POST['GuAccName'], "text"),
GetSQLValueString($_POST['GuAccContName'], "text"),
GetSQLValueString($_POST['GuAccAdd'], "text"),
GetSQLValueString($_POST['GuAccDayTel'], "text"),
GetSQLValueString($_POST['GuAccMobTel'], "text"),
GetSQLValueString($_POST['GuAccEmail'], "text"),
GetSQLValueString($_POST['GuAccAdditional'], "text"),
GetSQLValueString($_POST['GuEmployerNam'], "text"),
GetSQLValueString($_POST['GuEmployerAdd'], "text"),
GetSQLValueString($_POST['GuEmployerContactName'], "text"),
GetSQLValueString($_POST['GuEmployerTele'], "text"),
GetSQLValueString($_POST['GuEmployerEmail'], "text"),
GetSQLValueString(isset($_POST['GuEmployerCCj']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString(isset($_POST['GuEmployerArr']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString(isset($_POST['GuEmployerBankR']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString(isset($_POST['GuEmployerNone']) ? "true" : "", "defined","'Y'","'N'"));
mysql_select_db($database_hostprop, $hostprop);
$Result1 = mysql_query($insertSQL, $hostprop) or die(mysql_error());
// Auto Login User
if (!isset($_SESSION)) {
session_start();
}
$_SESSION['MM_Username'] = $_POST['userid'];
$_SESSION['MM_UserGroup'] = "";
// Redirect user to make-payment.php
// With relevant POST Data
$post_data = array("amount"=>250,"type"=>"deposit");
$content_length = strlen($post_data);
$_SESSION['post_data'] = $post_data;
header("location: http://www.student.com/make-payment.php");
exit();
}
mysql_select_db($database_hostprop, $hostprop);
$query_rsApplyNow = "SELECT * FROM host_editprop WHERE available = 0";
$rsApplyNow = mysql_query($query_rsApplyNow, $hostprop) or die(mysql_error());
$row_rsApplyNow = mysql_fetch_assoc($rsApplyNow);
$totalRows_rsApplyNow = mysql_num_rows($rsApplyNow);
?>
<form class="cmxform"action="<?php echo $editFormAction; ?>" method="post" name="form2" id="form2">
<input type="hidden" name="MM_insert" value="form2" />
------all form content is on here---------
<input type="submit" value="submit" />
</form>