die ();
}
include("../databaseconnversion3.php");
$package_id = $_POST['package_id'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$mname = $_POST['mname'];
$company = $_POST['company'];
$addr1 = $_POST['addr1'];
$addr2 = $_POST['addr2'];
$city = $_POST['city'];
$state1 = $_POST['state'];
$getStateSql = "SELECT state_id from state_master_new where id = $state1";
$result = mysql_query($getStateSql);
if($result){
while($result_set = mysql_fetch_assoc($result)){
$state_abbrivation = $result_set['state_id'];
}
}
$zip = $_POST['zip'];
$community_name = $_POST['community_name'];
$units = $_POST['units'];
$domain = $_POST['domain'];
$cdomain = $_POST['cdomain'];
$phone1 = $_POST['phone1'] ;
$phone2 = $_POST['phone2'] ;
$phone3 = $_POST['phone3'];
$email = $_POST['email'];
$uname = $_POST['uname'];
$password = $_POST['txtpassword'];
if($_POST['mail_array']!=""){
$mail_array = stripslashes($_POST['mail_array']);
}
if(empty($mail_array)){
$admin_mail_array['first_name']=$fname ;
$admin_mail_array['middle_name']=$mname ;
$admin_mail_array['last_name']=$lname ;
$admin_mail_array['company_name']=$company ;
$admin_mail_array['street_address']=$addr1 ;
$admin_mail_array['apt_suite']=$addr2 ;
$admin_mail_array['city']=$city ;
$admin_mail_array['state']=$state_abbrivation ;
$admin_mail_array['zip']=$zip ;
$admin_mail_array['phone']=$phone1.$phone2.$phone3;
$admin_mail_array['email']=$email;
$admin_mail_array['community_url']=$community_name;
}
// code for valid community name
$community_name = trim($community_name);
$name_break = explode(" ",$community_name);
$underscore="";
for($counter=0 ; $counter < count($name_break); $counter++)
{
if($name_break[$counter]!="")
{
$new_comm_folder = $new_comm_folder.$underscore.$name_break[$counter];
}
$underscore="_";
}
//Check for Duplicate Folder
$sql_user = "select community_name from hoa_community_registration where community_name='$new_comm_folder'";
$rs_user = mysql_query($sql_user);
$num_rows2 = mysql_num_rows($rs_user);
//check for email
$sql_user = "select community_name from hoa_community_registration where community_email='$email'";
$rs_user = mysql_query($sql_user);
$num_rows3 = mysql_num_rows($rs_user); if($package_id)
{
$sql_package = "select * from hoa_package where package_id=$package_id";
$rs_package = mysql_query($sql_package);
$numrows = mysql_num_rows($rs_package);
if($numrows)
{
$record_package=mysql_fetch_array($rs_package);
$package_id = $record_package[package_id];
$package_name = $record_package['package_title'];
if(empty($mail_array)){
$admin_mail_array['package_name']=$package_name;
}
$package_desc = $record_package['package_desc'];
$package_price = $record_package['package_price'];
}
} function select1($x,$y) {
if($x==$y){
return "selected";
}
}?>