MC (Microcommunity) Search and Match — Search for Compatible Groups
- Register Group with Captcha
- View Group Profile
- Edit Group Profile
- MC (Microcommunity) Search and Match
- MC (Microcommunity) Search and Match — Security
- MC (Microcommunity) Search and Match — JavaScript
- MC (Microcommunity) Search and Match — Form
- MC (Microcommunity) Search and Match — PHP
- MC Questionnaire
- Microcommunity (MC) Registration Script — Enter Questionnaire Data in Database
- MC Search and Match Profile and Account Management
- Login to MC Search and Match Profile and Account Management
- Logout of MC Search and Match Profile and Account Management
- MC Questionnaire Login
- MC Questionnaire Info
- Delete Group Account
- Forgot User Name
- Forgot Password
- Form to Send Private Message
- Send Private Message
- Private Message Outbox
- Private Message Inbox
- Delete Private Message from Inbox
- Delete Private Message from Outbox
- Private Message Logout
- Private Message Session Monitoring
- MC (Microcommunity) Search and Match Session Monitoring
- Configure File for Database Connection
- Captcha Script for Registration and Login
So what is an MC and why would anyone want to search it, register for it, or even hear about it? See for yourself: MCs (Microcommunities). They are the key to social enhancement and community enrichment on a scale undreamed of on the social networking sites and chat rooms that are—in comparison—a pale imitation of real connectedness and successful community functioning.
This search and match script has been specifically designed for MCs (Microcommunities), but it will work for any group matching purposes. The script and its form deal with groups matching criteria with other groups, including group configurations (characteristics of who is in it) and group preferences (smoking, drinking, pets, religion, religious openness, racial preferences, gay/straight, housing type sought, parenting preferences, employment, and willingness to relocate). This latter relates to smaller groups (1-8 people) like families and/or groups of people moving to be in MCs with other groups to form MCs with 12-40 people in them. This relocation aspect is obviously the most challenging aspect of the endeavor, but well worth it to achieve the type of connection, community, childcare quality and eldercare quality everyone wants in life but few ever come close to achieving, settling instead for the substandard, low-quality lifestyles most people have simply because "well—everyone else I know is doing this . . . . . . what else can we DO?" MCs (Microcommunities), then, are THE BIG ANSWER to that very question. The site thebiganswer.info has barely started. It will be enlarging and growing and improving continuously into the future.
The script below has been tested and works to help groups find compatible groups. It is copyrighted by MCS Investments, Inc., but you may use it to help groups find compatible groups, regardless of whether they are MC related. (You may not use it if the groups in question are in any way related to illegal activities, porn, hate groups, terrorism, etc.) We wish you luck in succeeding in finding compatible groups that can relate well together and hopefully create microcommunities.
The Left tends to say "it takes a village" (partially correct, but implying lots of social programs to pay for). The Right tends to say "no, it takes a family, not a village" (partially correct, and implying dislike of paying for social programs for things that families ought to be dealing with). MC members, on the other hand, transcend this energy-sapping culture war silliness and say "we have all the advantages of both the Left's compassionate village and the Right's family-centered values and none of the disadvantages of either of these worldviews!"
Use the following links to get to tutorials on the various coding aspects of the script below:
- MC (Microcommunity) Search and Match — Security
- MC (Microcommunity) Search and Match — JavaScript
- MC (Microcommunity) Search and Match — Form
- MC (Microcommunity) Search and Match — PHP
The script below is called match.php
<?php
//copyright (c) 2011 by MCS Investments, Inc. all rights reserved
include_once"checkid.php";
$U=$_SESSION['username'];
define('_NODIRECTACCESS', TRUE);
include_once"includes/config.php";
if (!isset($_SESSION['groupname']) || !isset($_SESSION['userid']) || !isset($_SESSION['username']) || $_SESSION
['username']<>$U || !isset($U) || $U=="" || strlen($U)<6 || !isset($_SESSION['sessionid'])){echo '<script language="javascript">alert("Please login."); window.location = "login-to-mc.php";</script>';}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<TITLE>MC Search and Match</TITLE>
<meta name="description" content="MC Search and Match">
<meta name="keywords" content="MC Search and Match,MC Search and Matching,info,match">
<style type="text/css">
BODY {margin-left:0; margin-right:0; margin-top:0;text-align:left}
p, li, input {font:13px Verdana; color:black;text-align:left}
#j td {font:normal 13px Verdana;color:black;text-align:right;padding:0 6px 0 6px}
.l {text-align:left;margin-left:200px}
h1 {font:bold 28px Verdana; color:black;text-align:center}
h2 {font:bold 24px Verdana;text-align:center}
h3 {font:bold 20px Verdana;}
b {text-align:center;}
.c {background-color:#ccc}
.k {text-align:right}
.i {text-align:right;width:100px}
.j {position:absolute;top:0px;left:150px;width:700px}
.m {margin-left:130px}
#y {margin-top:-720px;width:600px}
#t {margin:50px 0 0 0;border:2px solid blue;background-color:#ddd;width:900px}
#j {margin:-417px 0 0 0;}
#myform {position:absolute;top:120px;left:50px;width:900px;border:2px solid black;background-color:#8aa;}
.submit {font:bold 13px Verdana;color:blue;max-width:120px;width:120px;text-align:center;padding:0;}
</style>
<script language="javascript">
function c(){
var g=document.formpw.Willing_to_relocate;
for (var z=0; z<g.length; z++){
g[z].onclick=function(){var num=0;
for(var q=0;q<g.length;q++){num+=(g[q].checked);}
if (num>1){alert("Select one checkbox only, please, in \"Willing to relocate\"")
this.checked=false;}}}}
function validatepassword(){
var x=0;var a=new Array();var b=new Array();
var e=document.getElementsByTagName("input");
for(var i=0;i<e.length;i++){
if(e[i].checked==true && e[i].type=="checkbox"){a[x]=e[i].name;b[x]=e[i].value;x++;
if(x>10){a=a.slice(0,10);b=b.slice(0,10);}}}
if(x>10){alert("Only 10 criteria, please. Your 11th through "+x+"th criteria were discarded.");}
if(x>0){document.formpw.fieldname.value = a.toString();
document.formpw.fieldvalue.value = b.toString();}
if(document.formpw.city.value.length>0){
var ck_city = /^[A-Za-z\s\-]{2,33}$/;
if (document.formpw.city.value.search(ck_city)==-1)
{alert("Please only enter 2 to 33 letters, space, or hyphen for city name.");document.formpw.city.focus();return false}}
if(document.formpw.state.value.length>0){
var ck_state = /^[A-Za-z]{2,2}$/;
if (document.formpw.state.value.search(ck_state)==-1)
{alert("Please select a State.");document.formpw.state.focus();return false}}
if(document.formpw.zip.value.length>0){
var ck_zip = /^[0-9]{5,5}$/;
if (document.formpw.zip.value.search(ck_zip)==-1)
{alert("Please only enter 5 number zip code.");document.formpw.zip.focus();return false}}
if(document.formpw.groupname.value.length>0){
var ck_groupname = /^[A-Za-z0-9_]{6,20}$/;
if (document.formpw.groupname.value.search(ck_groupname)==-1)
{alert("Please only enter 6 to 20 letters, numbers and underline for group name.");document.formpw.groupname.focus();return false}}
return true;}
function saveresults(){alert("To save a record of your search results, go to your browser's File menu and select Save As, then choose Webpage, HTML only, except in Chrome, where you need to choose Webpage, Complete. On Mac Safari, save as Web Archive.");}
mactest=(navigator.userAgent.indexOf("Mac")!=-1)
Netscape=(navigator.appName.indexOf("Netscape") != -1)
msafari=(navigator.userAgent.indexOf("Safari")!= -1)
wsafari=0; if(!mactest&&msafari){wsafari=1;msafari=0}
is_opera = 0; if(window.opera){is_opera=1}
is_ie_mac = 0; is_ie=0;if(document.all){is_ie=1}
if(is_ie&&mactest){is_ie_mac=1}
function fixwidth(){if(!mactest&&Netscape){
var e=document.getElementsById('myform');e.style.top='-80px';}
if(!mactest&&Netscape){
var e=document.getElementsByTagName("table");
for(var i=0;i<e.length;i++){e[i].style.marginTop='-440px';}}
if(mactest&&msafari&&!is_ie_mac){
var e=document.getElementsByTagName("table");
for(var i=0;i<e.length;i++){e[i].style.marginTop='-330px';}}
if(mactest&&!msafari&&is_ie_mac){alert("This browser is dead. Please use Firefox or Safari.");}
}
</script>
</head>
<body onload="fixwidth()">
<?php
$dist=array(0,0,1000,500,200,100,50,10,2,0);
function milesapart($lat1,$long1,$lat2,$long2){
$miles = sin(deg2rad($lat1))
* sin(deg2rad($lat2))
+ cos(deg2rad($lat1))
* cos(deg2rad($lat2))
* cos(deg2rad($long1-$long2));
$miles = (rad2deg(acos($miles))) * 69.09;
return $miles;}
function coords($z1,$z2){
$res=mysql_query("SELECT latitude,longitude,class FROM zipcodes WHERE zipcode = '$z1'") or die(mysql_error());
$row = mysql_fetch_array($res);$lat1=$row['latitude'];$long1=$row['longitude'];$c1=$row['class'];
$res=mysql_query("SELECT latitude,longitude,class FROM zipcodes WHERE zipcode = '$z2'") or die(mysql_error());
$row = mysql_fetch_array($res);$lat2=$row['latitude'];$long2=$row['longitude'];$c2=$row['class'];
if($c1<>"MILITARY" && $c2<>"MILITARY" && $lat1<>0 && $long1<>0 && $lat2<>0 && $long2<>0){
$zz=milesapart($lat1,$long1,$lat2,$long2);
}else{$zz=9999;}
return $zz;}
function restorem(){
global $first;
for ($i=0;$i<count($first);$i++) {
$sql="UPDATE mc_members SET score=1 WHERE id='$first[$i]'";
$result=mysql_query($sql);}}
function opt($a,$e){
global $a,$e,$x;
$a=substr($a,1,strlen($a)-2);
$c=explode(",",$a);$x="";
for ($i=0;$i<count($c);$i++) {$x=$x.$e[$c[$i]].", ";}
return substr($x,0,-2);}
function get_record($id,$score){
global $a,$e,$x;
$Smoking_Drinking=array('No preference','Prefer nonsmokers','Smoking not an issue','Prefer nondrinkers','Drinking not an issue');
$Preferred_Housing_Type=array('No preference','Row houses','Apartments','Mobile homes','Manufactured homes','Condominium','Co-op','Hotel','Motel','Farm','Rural','City','Suburbs','Retirement community','Gated community','Pocket neighborhoods');
$Willing_to_relocate=array('No preference','Yes, anywhere','Yes, up to 1000 miles','Yes, up to 500 miles','Yes, up to 200 miles','Yes, up to 100 miles','Yes, up to 50 miles','Yes, up to 10 miles','Yes, up to 2 miles','No');
$MC_type_sought=array('No preference','With children','Without children','Children not an issue','Singles MC','Married MC','Mixed MC','Marital status not an issue');
$Open_to_be_in_mixed_race_MC=array('No preference','Prefer to be in MC of my own race','Prefer to be in MC with racial diversity','Race not an issue');
$Sexuality=array('No preference','Prefer not to answer','Open to be in mixed sexual preference MC','Prefer to be in MC of my own sexual preference','Prefer to be in MC with sexual preference diversity','Sexual preference not an issue');
$Religious_Openness=array('No preference','Open to be in mixed religion MC','Prefer to be in MC of my own religion','Prefer to be in MC with religious diversity','Religion not an issue','Prefer not to answer');
$Religion=array('No preference','Agnostic','Apostolic or New Apostolic','Assemblies of God','Atheist','Baha\'I','Baptist','Buddhist','Catholic','Christian Reform','Christian Science','Christian no denomination supplied','Church of God','Church of the Brethren','Church of the Nazarene','Churches of Christ','Congregational or United Church of Christ','Deity','Disciples of Christ','Druid','Eckankar','Episcopalian or Anglican','Ethical Culture','Evangelical or Born Again','Foursquare Gospel','Full Gospel','Fundamentalist','Hindu','Holiness or Holy','Humanist','Independent Christian Church','Jehovah\'s Witness','Jewish','Lutheran','Mennonite','Methodist or Wesleyan','Mormon or Latter Day Saints','Muslim','Native American','New Age','No religion','Nondenominational','Orthodox Eastern','Other unclassified','Pagan','Pentecostal or Charismatic','Presbyterian','Protestant no denomination supplied','Quaker','Rastafarian','Reformed or Dutch Reform','Salvation Army','Santeria','Scientologist','Secular','Seventh Day Adventist','Sikh','Spiritualist','Taoist','Unitarian or Universalist','Wiccan');
$Childrearing_Style_and_Preferences=array('No preference','Liberal or permissive','Authoritative','Authoritarian','Liberal and authoritative mix','Liberal and authoritarian mix','Authoritative and authoritarian mix');
$Pets=array('No preference','Have dogs','Have cats','Have birds','Have other pets','Have barking dogs','Have screeching birds','Tolerant of neighbors\' pet sounds','Not tolerant of neighbors\' pet sounds');
$Personal_Entertainment=array('No preference','Tolerant of neighbors\' loud music or TV','Not tolerant of neighbors\' loud music or TV');
$Housing_Interested_in_Common_Shared_Space_for=array('No preference','Cooking','Laundry','Exercise','Childcare','Eldercare','Home schooling','Meetings','Entertainment','Not interested in common space');
$Employment=array('No preference','Management, business, and financial','Professional and related','Office and administrative support','Service','Installation, maintenance, and repair','Transportation and material moving','Construction and extraction','Production','Sales and related','Farming, fishing, and forestry','Armed forces','Part-time','Temporary','Retired','Unemployed','Independently wealthy');
$result = mysql_query("SELECT * FROM mc_members WHERE id = '$id'") or die(mysql_error());
$num=mysql_num_rows($result);
if($num>0){
$row = mysql_fetch_array($result);
echo "<center><div id='t'><table border='2' id='j'>";
echo "<tr><td colspan='5' style='text-align:center;color:red'>(click link to send message) <b><span style='color:black'>Group Name:</span> <a HREF='send-message-form.php?gr=".htmlentities(stripslashes($row['groupname']), ENT_QUOTES)."'>".htmlentities(stripslashes($row['groupname']), ENT_QUOTES)."</a></b> (fills ".$score." of your criteria)</td></tr><br>";
echo "<tr><td colspan='5' style='text-align:center'><b>Location: ".htmlentities(stripslashes($row['city']), ENT_QUOTES).", ";
echo htmlentities(stripslashes($row['state']), ENT_QUOTES)." ";
echo htmlentities(stripslashes($row['zip']), ENT_QUOTES)."</b></td></tr><br>";
echo "<tr><td style='text-align:center;width:147px;max-width:147px;min-width:147px;word-wrap:break-word;'><b>Males</b></td><td style='text-align:center;width:147px;max-width:147px;min-width:147px;word-wrap:break-word;'><b>Females</b></td><td style='width:143px;max-width:143px;min-width:143px;word-wrap:break-word;'>Childless: ".htmlentities(stripslashes($row['childless']), ENT_QUOTES)."</td><td style='width:143px;max-width:143px;min-width:143px;word-wrap:break-word;'>White: ".htmlentities(stripslashes($row['white']), ENT_QUOTES)."</td><td style='width:230px;max-width:230px;min-width:230px;word-wrap:break-word;'>Allergies: ".htmlentities(stripslashes($row['allergies']), ENT_QUOTES)."</td></tr><BR>";
echo "<tr><td>0-3 yr: ".htmlentities(stripslashes($row['males03']), ENT_QUOTES)."</td><td>0-3 years old: ".htmlentities(stripslashes($row['females03']), ENT_QUOTES)."</td><td>Empty Nesters: ".htmlentities(stripslashes($row['emptynesters']), ENT_QUOTES)."</td><td>Black: ".htmlentities(stripslashes($row['black']), ENT_QUOTES)."</td><td>Chronic: ".htmlentities(stripslashes($row['chronic']), ENT_QUOTES)."</td></tr><br>";
echo "<tr><td>4-7 years old: ".htmlentities(stripslashes($row['males47']), ENT_QUOTES)."</td><td>4-7 years old: ".htmlentities(stripslashes($row['females47']), ENT_QUOTES)."</td><td>Widows: ".htmlentities(stripslashes($row['widows']), ENT_QUOTES)."</td><td>Asian: ".htmlentities(stripslashes($row['asian']), ENT_QUOTES)."</td><td>Mental: ".htmlentities(stripslashes($row['mental']), ENT_QUOTES)."</td></tr><br>";
echo "<tr><td>8-11 years old: ".htmlentities(stripslashes($row['males811']), ENT_QUOTES)."</td><td>8-11 years old: ".htmlentities(stripslashes($row['females811']), ENT_QUOTES)."</td><td>Widowers: ".htmlentities(stripslashes($row['widowers']), ENT_QUOTES)."</td><td>Hispanic: ".htmlentities(stripslashes($row['hispanic']), ENT_QUOTES)."</td><td>Disabilities: ".htmlentities(stripslashes($row['disabilities']), ENT_QUOTES)."</td></tr><br>";
echo "<tr><td>12-14 years old: ".htmlentities(stripslashes($row['males1214']), ENT_QUOTES)."</td><td>12-14 years old: ".htmlentities(stripslashes($row['females1214']), ENT_QUOTES)."</td><td>Married: ".htmlentities(stripslashes($row['married']), ENT_QUOTES)."</td><td>Hawaiian: ".htmlentities(stripslashes($row['hawaiian']), ENT_QUOTES)."</td><td>Need Ramps: ".htmlentities(stripslashes($row['ramps']), ENT_QUOTES)."</td></tr><br>";
echo "<tr><td>15-17 years old: ".htmlentities(stripslashes($row['males1517']), ENT_QUOTES)."</td><td>15-17 years old: ".htmlentities(stripslashes($row['females1517']), ENT_QUOTES)."</td><td>Living Together: ".htmlentities(stripslashes($row['livingtogether']), ENT_QUOTES)."</td><td>Mixed: ".htmlentities(stripslashes($row['mixed']), ENT_QUOTES)."</td><td>Willing to do Eldercare: ".htmlentities(stripslashes($row['willingeldercare']), ENT_QUOTES)."</td></tr><br>";
echo "<tr><td>18-23 years old: ".htmlentities(stripslashes($row['males1823']), ENT_QUOTES)."</td><td>18-23 years old: ".htmlentities(stripslashes($row['females1823']), ENT_QUOTES)."</td><td>Separated: ".htmlentities(stripslashes($row['separated']), ENT_QUOTES)."</td><td>Criminal: ".htmlentities(stripslashes($row['criminal']), ENT_QUOTES)."</td><td>Available to do Eldercare: ".htmlentities(stripslashes($row['availableeldercare']), ENT_QUOTES)."</td></tr><br>";
echo "<tr><td>24-34 years old: ".htmlentities(stripslashes($row['males2434']), ENT_QUOTES)."</td><td>24-34 years old: ".htmlentities(stripslashes($row['females2434']), ENT_QUOTES)."</td><td>Divorced: ".htmlentities(stripslashes($row['divorced']), ENT_QUOTES)."</td><td>Home Schooled: ".htmlentities(stripslashes($row['homeschooled']), ENT_QUOTES)."</td><td>Need Eldercare: ".htmlentities(stripslashes($row['needeldercare']), ENT_QUOTES)."</td></tr><br>";
echo "<tr><td>35-49 years old: ".htmlentities(stripslashes($row['males3549']), ENT_QUOTES)."</td><td>35-49 years old: ".htmlentities(stripslashes($row['females3549']), ENT_QUOTES)."</td><td>Engaged: ".htmlentities(stripslashes($row['engaged']), ENT_QUOTES)."</td><td>Public Schools: ".htmlentities(stripslashes($row['publicschools']), ENT_QUOTES)."</td><td>Willing to do Childcare: ".htmlentities(stripslashes($row['willingchildcare']), ENT_QUOTES)."</td></tr><br>";
echo "<tr><td>50-65 years old: ".htmlentities(stripslashes($row['males5065']), ENT_QUOTES)."</td><td>50-65 years old: ".htmlentities(stripslashes($row['females5065']), ENT_QUOTES)."</td><td>Single: ".htmlentities(stripslashes($row['single']), ENT_QUOTES)."</td><td>Private Schools: ".htmlentities(stripslashes($row['privateschools']), ENT_QUOTES)."</td><td>Available to do Childcare: ".htmlentities(stripslashes($row['availablechildcare']), ENT_QUOTES)."</td></tr><br>";
echo "<tr><td>66-79 years old: ".htmlentities(stripslashes($row['males6679']), ENT_QUOTES)."</td><td>66-79 years old: ".htmlentities(stripslashes($row['females6679']), ENT_QUOTES)."</td><td>Gay Males: ".htmlentities(stripslashes($row['gaymales']), ENT_QUOTES)."</td><td>Religious Schools: ".htmlentities(stripslashes($row['religiousschools']), ENT_QUOTES)."</td><td>Need Childcare: ".htmlentities(stripslashes($row['needchildcare']), ENT_QUOTES)."</td></tr><br>";
echo "<tr><td>80+ years old: ".htmlentities(stripslashes($row['males80']), ENT_QUOTES)."</td><td>80+ years old: ".htmlentities(stripslashes($row['females80']), ENT_QUOTES)."</td><td>Lesbian: ".htmlentities(stripslashes($row['lesbian']), ENT_QUOTES)."</td><td>Special Schools: ".htmlentities(stripslashes($row['specialschools']), ENT_QUOTES)."</td><td> </td></tr><br>";
echo "<tr><th style='text-align:center' colspan='5'><b>Preferences</b></th></tr><BR>";
$a=htmlentities(stripslashes($row['Smoking_Drinking']), ENT_QUOTES);$e=$Smoking_Drinking;$x=opt($a,$e);
echo "<tr><td colspan='3' style='text-align:left'>Smoking and Drinking: ".$x."</td>";
$a=htmlentities(stripslashes($row['Preferred_Housing_Type']), ENT_QUOTES);$e=$Preferred_Housing_Type;$x=opt($a,$e);
echo "<td colspan='2' style='text-align:left'>Preferred Housing Type: ".$x."</td></tr><br>";
$a=htmlentities(stripslashes($row['Willing_to_relocate']), ENT_QUOTES);$e=$Willing_to_relocate;$x=opt($a,$e);
echo "<tr><td colspan='3' style='text-align:left'>Willing to Relocate: ".$x."</td>";
$a=htmlentities(stripslashes($row['MC_type_sought']), ENT_QUOTES);$e=$MC_type_sought;$x=opt($a,$e);
echo "<td colspan='2' style='text-align:left'>MC Type Sought: ".$x."</td></tr><br>";
$a=htmlentities(stripslashes($row['Open_to_be_in_mixed_race_MC']), ENT_QUOTES);$e=$Open_to_be_in_mixed_race_MC;$x=opt($a,$e);
echo "<tr><td colspan='3' style='text-align:left'>Open to be in Mixed Race MC: ".$x."</td>";
$a=htmlentities(stripslashes($row['Sexuality']), ENT_QUOTES);$e=$Sexuality;$x=opt($a,$e);
echo "<td colspan='2' style='text-align:left'>Sexuality: ".$x."</td></tr><br>";
$a=htmlentities(stripslashes($row['Religious_Openness']), ENT_QUOTES);$e=$Religious_Openness;$x=opt($a,$e);
echo "<tr><td colspan='3' style='text-align:left'>Religious Openness: ".$x."</td>";
$a=htmlentities(stripslashes($row['Religion']), ENT_QUOTES);$e=$Religion;$x=opt($a,$e);
echo "<td colspan='2' style='text-align:left'>Religion: ".$x."</td></tr><br>";
$a=htmlentities(stripslashes($row['Childrearing_Style_and_Preferences']), ENT_QUOTES);$e=$Childrearing_Style_and_Preferences;$x=opt($a,$e);
echo "<tr><td colspan='3' style='text-align:left'>Childrearing Style and Preferences: ".$x."</td>";
$a=htmlentities(stripslashes($row['Pets']), ENT_QUOTES);$e=$Pets;$x=opt($a,$e);
echo "<td colspan='2' style='text-align:left'>Pets: ".$x."</td></tr><br>";
$a=htmlentities(stripslashes($row['Personal_Entertainment']), ENT_QUOTES);$e=$Personal_Entertainment;$x=opt($a,$e);
echo "<tr><td colspan='3' style='text-align:left'>Personal Entertainment: ".$x."</td>";
$a=htmlentities(stripslashes($row['Housing_Interested_in_Common_Shared_Space_for']), ENT_QUOTES);$e=$Housing_Interested_in_Common_Shared_Space_for;$x=opt($a,$e);
echo "<td colspan='2' style='text-align:left'>Housing—Interested in Common Shared Space for: ".$x."</td></tr><br>";
$a=htmlentities(stripslashes($row['Employment']), ENT_QUOTES);$e=$Employment;$x=opt($a,$e);
echo "<tr><td colspan='5' style='text-align:left'>Employment: ".$x."</td></tr><br></table></div>";
}}
$R=$_GET['searchtype'];
if($R<>"all" && $R<>"first"){$R="all";}
$Entry=$_POST['entry'];
if($Entry==1){
$replacement = '';
$fieldname = $_POST['fieldname'];
$fieldvalue = $_POST['fieldvalue'];
$relocate=0;$nolocate=0;$gotmatchrelocate=0;$gotmatch=0;
if(strlen($fieldvalue)<>0){
$pattern7 = '/[^a-zA-Z0-9\\_\\,]/i';
$pattern8 = '/[^0-9\\-\\,]/i';
$fieldname=strip_tags($fieldname);
$fieldname=preg_replace($pattern7, $replacement, $fieldname);
$fieldvalue=strip_tags($fieldvalue);
$fieldvalue=preg_replace($pattern8, $replacement, $fieldvalue);
$fieldnames = explode(',',$fieldname);
$fieldvalues = explode(',',$fieldvalue);
for($i=0;$i<count($fieldvalues);$i++){$fieldvalues[$i]=substr($fieldvalues[$i],0,2);
if($fieldnames[$i]=="Willing_to_relocate"){$ii=$i;$relocate=$dist[$fieldvalues[$i]];
}}
if($relocate>0 && count($fieldvalues)==1){unset($fieldvalue);unset($fieldname);}
if($relocate>0){unset($fieldvalues[$ii]);unset($fieldnames[$ii]);$fieldvalues=array_values($fieldvalues);$fieldnames=array_values($fieldnames);}}
$r=mysql_query("SELECT zip FROM mc_members WHERE username='$U'");
$row = mysql_fetch_array($r);
$z1=$row['zip'];
if($R=="first"){
$first=array();
$r=mysql_query("SELECT id FROM mc_members WHERE score>0 ORDER BY score DESC LIMIT 30");
while($row = mysql_fetch_array($r)){
array_push ($first, $row[0]);}}
$G=$_POST['groupname'];
$C=$_POST['city'];
$S=$_POST['state'];
$Z=$_POST['zip'];
$G=substr($G,0,20);
$C=substr($C,0,33);
$S=substr($S,0,2);
$Z=substr($Z,0,5);
$pattern1 = '/[^a-zA-Z\\-\\s]/i';
$pattern3 = '/[^a-zA-Z0-9\\_]/i';
$pattern5 = '/[^0-9]/';
$pattern6 = '/[^A-Z]/';
$G=strip_tags($G);
$C=strip_tags($C);
$S=strip_tags($S);
$Z=strip_tags($Z);
$C=preg_replace($pattern1, $replacement, $C);
$Z=preg_replace($pattern5, $replacement, $Z);
$G=preg_replace($pattern3, $replacement, $G);
$S=preg_replace($pattern6, $replacement, $S);
if (strlen($G)<6&&strlen($G)>0) {restorem();echo '<script language="javascript">alert("Please enter 6 to 20 characters for group name."); window.location = "match.php?searchtype='.$R.'"; </script>';
}else{
if (strlen($C)<2&&strlen($C)>0) {restorem();echo '<script language="javascript">alert("Please enter 2 to 33 characters for city."); window.location = "match.php?searchtype='.$R.'"; </script>';
}else{
if ((strlen($S)<2 || strlen($S)>2)&&strlen($S)>0) {restorem();echo '<script language="javascript">alert("Please use dropdown list for state."); window.location = "match.php?searchtype='.$R.'"; </script>';
}else{
if (strlen($Z)<5&&strlen($Z)>0) {restorem();echo '<script language="javascript">alert("Please enter 5 characters for zip code."); window.location = "match.php?searchtype='.$R.'"; </script>';
}else{
//SEARCH HERE
$gotmatch=0;
$sql="UPDATE mc_members SET score=0";
$result=mysql_query($sql);
if($R=="all"){$gotmatch=-1;
if(strlen($G)>0){
$r=mysql_query("SELECT id FROM mc_members WHERE groupname='$G'");
$num_rows = mysql_num_rows($r);
if($num_rows>0){$gotmatch=1;
while($row = mysql_fetch_array($r)){
$ID=$row['id'];$sql="UPDATE mc_members SET score=score+1 WHERE id='$ID'";$result=mysql_query($sql);}}}
if(strlen($C)>0){
$r=mysql_query("SELECT id FROM mc_members WHERE city='$C'");
$num_rows = mysql_num_rows($r);
if($num_rows>0){$gotmatch=1;
while($row = mysql_fetch_array($r)){
$ID=$row['id'];$sql="UPDATE mc_members SET score=score+1 WHERE id='$ID'";$result=mysql_query($sql);}}}
if(strlen($S)>0){
$r=mysql_query("SELECT id FROM mc_members WHERE state='$S'");
$num_rows = mysql_num_rows($r);
if($num_rows>0){$gotmatch=1;
while($row = mysql_fetch_array($r)){
$ID=$row['id'];$sql="UPDATE mc_members SET score=score+1 WHERE id='$ID'";$result=mysql_query($sql);}}}
if(strlen($Z)>0){
$r=mysql_query("SELECT id FROM mc_members WHERE zip='$Z'");
$num_rows = mysql_num_rows($r);
if($num_rows>0){$gotmatch=1;
while($row = mysql_fetch_array($r)){
$ID=$row['id'];$sql="UPDATE mc_members SET score=score+1 WHERE id='$ID'";$result=mysql_query($sql);}}}
if(strlen($fieldvalue)<>0){$gotmatch=-1;
for($i=0;$i<count($fieldvalues);$i++){
if($fieldvalues[$i]=="-1"){
$r=mysql_query("SELECT id FROM mc_members WHERE $fieldnames[$i]>0");
}else{
$v=",".$fieldvalues[$i].",";
$r=mysql_query("SELECT id FROM mc_members WHERE $fieldnames[$i] LIKE '%".$v."%'");
}
$num_rows = mysql_num_rows($r);
if($num_rows>0){$gotmatch=1;}
while($row = mysql_fetch_array($r)){
$ID=$row['id'];$sql="UPDATE mc_members SET score=score+1 WHERE id='$ID'";$result=mysql_query($sql);}}}
}else{$gotmatch=-1; //the else is if $R=="first" -- so below is if it's "first"
for($i=0;$i<count($first);$i++){
$sql="UPDATE mc_members SET score=1 WHERE id='$first[$i]'";
$result=mysql_query($sql);}
if(strlen($G)>0){
$r=mysql_query("SELECT id FROM mc_members WHERE groupname='$G' AND score>0");
$num_rows = mysql_num_rows($r);
if($num_rows>0){$gotmatch=1;
while($row = mysql_fetch_array($r)){
$ID=$row['id'];$sql="UPDATE mc_members SET score=score+1 WHERE id='$ID'";$result=mysql_query($sql);}}}
if(strlen($C)>0){
$r=mysql_query("SELECT id FROM mc_members WHERE city='$C' AND score>0");
$num_rows = mysql_num_rows($r);
if($num_rows>0){$gotmatch=1;
while($row = mysql_fetch_array($r)){
$ID=$row['id'];$sql="UPDATE mc_members SET score=score+1 WHERE id='$ID'";$result=mysql_query($sql);}}}
if(strlen($S)>0){
$r=mysql_query("SELECT id FROM mc_members WHERE state='$S' AND score>0");
$num_rows = mysql_num_rows($r);
if($num_rows>0){$gotmatch=1;
while($row = mysql_fetch_array($r)){
$ID=$row['id'];$sql="UPDATE mc_members SET score=score+1 WHERE id='$ID'";$result=mysql_query($sql);}}}
if(strlen($Z)>0){
$r=mysql_query("SELECT id FROM mc_members WHERE zip='$Z' AND score>0");
$num_rows = mysql_num_rows($r);
if($num_rows>0){$gotmatch=1;
while($row = mysql_fetch_array($r)){
$ID=$row['id'];$sql="UPDATE mc_members SET score=score+1 WHERE id='$ID'";$result=mysql_query($sql);}}}
if(strlen($fieldvalue)<>0){$gotmatch=-1;
for($i=0;$i<count($fieldvalues);$i++){
if($fieldvalues[$i]=="-1"){
$r=mysql_query("SELECT id FROM mc_members WHERE $fieldnames[$i]>0 AND score>0");
}else{
$v=",".$fieldvalues[$i].",";
$r=mysql_query("SELECT id FROM mc_members WHERE $fieldnames[$i] LIKE '%".$v."%' AND score>0");
}
$num_rows = mysql_num_rows($r);
if($num_rows>0){$gotmatch=1;}
while($row = mysql_fetch_array($r)){
$ID=$row['id'];$sql="UPDATE mc_members SET score=score+1 WHERE id='$ID' AND score>0";$result=mysql_query($sql);}}}
if($gotmatch==1){$sql="UPDATE mc_members SET score=score-1 WHERE score>0";$result=mysql_query($sql);}
}//the end of the else that is if $R=="first" (the stuff below is for either "first" or "all")
if ($gotmatch<1 && $relocate==0){restorem();echo '<script language="javascript">var answer = confirm ("No results were found. If you want to Search Your Results, click OK. If you want to Search All, click Cancel.");if (answer){window.location = "match.php?searchtype='.$R.'";}else{window.location = "match.php";} </script>';
}else{
if($gotmatch==1 && $relocate==0){$nolocate=1;}
$gotmatchrelocate=0;
if($gotmatch==1 && $relocate>0){
$nolocate==0;$w=-1;if($R=="first"){$w=0;};
$r=mysql_query("SELECT id,zip FROM mc_members WHERE score>'$w'");
while($row = mysql_fetch_array($r)){
$id=$row['id'];$z2=$row['zip'];$zz=coords($z1,$z2);
if($relocate>=$zz){$sql="UPDATE mc_members SET score=score+1 WHERE id='$id' AND score>'$w'";$result=mysql_query($sql);$gotmatchrelocate=mysql_affected_rows();
}else{
$sql="UPDATE mc_members SET score=0 WHERE id='$id'";$result=mysql_query($sql);
}}
if($w==0){$sql="UPDATE mc_members SET score=score-1 WHERE score>0";$result=mysql_query($sql);}}
if($gotmatch<1 && $relocate>0){
$nolocate==0;$w=-1;if($R=="first"){$w=0;};
$r=mysql_query("SELECT id,zip FROM mc_members WHERE score>'$w'");
while($row = mysql_fetch_array($r)){
$id=$row['id'];$z2=$row['zip'];$zz=coords($z1,$z2);
if($relocate>=$zz){$sql="UPDATE mc_members SET score=score+1 WHERE id='$id' AND score>'$w'";$result=mysql_query($sql);$gm=mysql_affected_rows();if($gm==1){$gotmatchrelocate=1;}
}else{
$sql="UPDATE mc_members SET score=0 WHERE id='$id'";$result=mysql_query($sql);
}}
if($w==0){$sql="UPDATE mc_members SET score=score-1 WHERE score>0";$result=mysql_query($sql);}}
if(($relocate>0 && $gotmatchrelocate<1) || ($relocate==0 && $nolocate==0)){restorem();echo '<script language="javascript">var answer = confirm ("No results were found. If you want to Search Your Results, click OK. If you want to Search All, click Cancel.");if (answer){window.location = "match.php?searchtype='.$R.'";}else{window.location = "match.php";} </script>';
}else{
echo "<BR><BR><BR><BR>";
$r=mysql_query("SELECT id,score FROM mc_members WHERE score>0 ORDER BY score DESC LIMIT 30");
while($row = mysql_fetch_array($r)){
$id=$row['id'];
$score=$row['score'];
get_record($id,$score);}
echo "You got ".mysql_num_rows($r)." results";}
mysql_close();
echo '<center><div class="j"><center><h1>MC Search and Match Results</h1><br>
<a HREF="http://www.thebiganswer.info/">Home</a>
<a HREF="register-for-mc.php">Account Management</a> <a HREF="match.php?searchtype=all">Search All</a> <a HREF="match.php?searchtype=first">Search These Results</a> <a HREF="#" onclick="saveresults()">Save These Results</a></center></div></center>';
}}}}}}
if($Entry==0){ ?>
<center><div class='j'><center><h1>MC Search and Match</h1><form id='formpw' name="formpw" method="post" action="match.php?searchtype=<?php echo $R; ?>" onsubmit="return validatepassword()"><br>
<a HREF="http://www.thebiganswer.info/">Home</a>
<a HREF="register-for-mc.php">Account Management</a> <a HREF="register-with-captcha.php">Register</a> <a HREF="login-to-mc.php">Login</a></center></div></center>
<div id='myform'><center><h3>Search Criteria</h3><u><i><span style='color:maroon;font-weight:bold;font-size:18px'>Check or enter up to 10 search criteria.</span></i></u></center>
<center>
<table id='y' cellspacing=0 cellpadding=0 border=0>
<tr><th colspan='2' class='c'><b>Profile</b></th></tr>
<tr><td class='i'><label for="Group Name"><b>Group Name: </b></td><td><input type="text" name="groupname" size="20" maxlength="20" value=""></label></td></tr>
<tr><td class='i'><label for="City"><b>City: </b></td><td><input type="text" name="city" size="20" maxlength="33" value=""></label></td></tr>
<tr><td class='i'><label for="State"><b>State: </b></td><td>
<select name="state" size='4'>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select>
</label></td></tr>
<tr><td class='i'><label for="Zip"><b>Zip: </b></td><td><input type="text" name="zip" size="5" maxlength="5" value=""></label></td></tr>
<tr><th colspan='2'><b> </b></th></tr>
<tr><th colspan='2' class='c'><b>Group Configuration</b></th></tr>
<tr><td class='k'><input type="checkbox" name="males03" value="-1"></td><td>There are one or more males in your group that are 0-3 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="males47" value="-1"></td><td>There are one or more males in your group that are 4-7 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="males811" value="-1"></td><td>There are one or more males in your group that are 8-11 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="males1214" value="-1"></td><td>There are one or more males in your group that are 12-14 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="males1517" value="-1"></td><td>There are one or more males in your group that are 15-17 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="males1823" value="-1"></td><td>There are one or more males in your group that are 18-23 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="males2434" value="-1"></td><td>There are one or more males in your group that are 24-34 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="males3549" value="-1"></td><td>There are one or more males in your group that are 35-49 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="males5065" value="-1"></td><td>There are one or more males in your group that are 50-65 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="males6679" value="-1"></td><td>There are one or more males in your group that are 66-79 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="males80" value="-1"></td><td>There are one or more males in your group that are 80 or more years old. </td></tr><BR><BR>
<tr><td class='k'><input type="checkbox" name="females03" value="-1"></td><td>There are one or more females in your group that are 0-3 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="females47" value="-1"></td><td>There are one or more females in your group that are 4-7 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="females811" value="-1"></td><td>There are one or more females in your group that are 8-11 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="females1214" value="-1"></td><td>There are one or more females in your group that are 12-14 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="females1517" value="-1"></td><td>There are one or more females in your group that are 15-17 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="females1823" value="-1"></td><td>There are one or more females in your group that are 18-23 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="females2434" value="-1"></td><td>There are one or more females in your group that are 24-34 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="females3549" value="-1"></td><td>There are one or more females in your group that are 35-49 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="females5065" value="-1"></td><td>There are one or more females in your group that are 50-65 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="females6679" value="-1"></td><td>There are one or more females in your group that are 66-79 years old. </td></tr>
<tr><td class='k'><input type="checkbox" name="females80" value="-1"></td><td>There are one or more females in your group that are 80 or more years old. </td></tr><BR><BR>
<tr><td class='k'><input type="checkbox" name="childless" value="-1"></td><td>There are adults in your group that are childless. </td></tr>
<tr><td class='k'><input type="checkbox" name="emptynesters" value="-1"></td><td>There are adults in your group that are empty nesters. </td></tr>
<tr><td class='k'><input type="checkbox" name="widows" value="-1"></td><td>There are adults in your group that are widows. </td></tr>
<tr><td class='k'><input type="checkbox" name="widowers" value="-1"></td><td>There are adults in your group that are widowers. </td></tr>
<tr><td class='k'><input type="checkbox" name="married" value="-1"></td><td>There are adults in your group that are married. </td></tr>
<tr><td class='k'><input type="checkbox" name="livingtogether" value="-1"></td><td>There are adults in your group that are living together. </td></tr>
<tr><td class='k'><input type="checkbox" name="separated" value="-1"></td><td>There are adults in your group that are separated. </td></tr>
<tr><td class='k'><input type="checkbox" name="divorced" value="-1"></td><td>There are adults in your group that are divorced. </td></tr>
<tr><td class='k'><input type="checkbox" name="engaged" value="-1"></td><td>There are adults in your group that are engaged. </td></tr>
<tr><td class='k'><input type="checkbox" name="single" value="-1"></td><td>There are adults in your group that are single. </td></tr><BR><BR>
<tr><td class='k'><input type="checkbox" name="gaymales" value="-1"></td><td>There are adult men in your group that are gay. </td></tr>
<tr><td class='k'><input type="checkbox" name="lesbian" value="-1"></td><td>There are adult women in your group that are lesbian. </td></tr><BR><BR>
<tr><td class='k'><input type="checkbox" name="white" value="-1"></td><td>There are people in your group that are White. </td></tr>
<tr><td class='k'><input type="checkbox" name="black" value="-1"></td><td>There are people in your group that are Black. </td></tr>
<tr><td class='k'><input type="checkbox" name="asian" value="-1"></td><td>There are people in your group that are Asian. </td></tr>
<tr><td class='k'><input type="checkbox" name="hispanic" value="-1"></td><td>There are people in your group that are Hispanic. </td></tr>
<tr><td class='k'><input type="checkbox" name="hawaiian" value="-1"></td><td>There are people in your group that are Native Hawaiian or Pacific Islander. </td></tr>
<tr><td class='k'><input type="checkbox" name="mixed" value="-1"></td><td>There are people in your group that are Mixed. </td></tr>
<tr><td class='k'><input type="checkbox" name="criminal" value="-1"></td><td>There are people in your group that have criminal records. </td></tr><BR><BR>
<tr><th colspan='2'><b>Schools</b></th></tr>
<tr><td class='k'><input type="checkbox" name="homeschooled" value="-1"></td><td>There are children in your group that are being home schooled. </td></tr>
<tr><td class='k'><input type="checkbox" name="publicschools" value="-1"></td><td>There are children in your group that go to public schools. </td></tr>
<tr><td class='k'><input type="checkbox" name="privateschools" value="-1"></td><td>There are children in your group that go to private schools. </td></tr>
<tr><td class='k'><input type="checkbox" name="religiousschools" value="-1"></td><td>There are children in your group that go to religious schools. </td></tr>
<tr><td class='k'><input type="checkbox" name="specialschools" value="-1"></td><td>There are children in your group that go to special schools. </td></tr><BR><BR>
<tr><th colspan='2'><b>Health</b></th></tr>
<tr><td class='k'><input type="checkbox" name="allergies" value="-1"></td><td>There are people in your group that have serious allergies. </td></tr>
<tr><td class='k'><input type="checkbox" name="chronic" value="-1"></td><td>There are people in your group that have chronic illnesses. </td></tr>
<tr><td class='k'><input type="checkbox" name="mental" value="-1"></td><td>There are people in your group that have mental illnesses. </td></tr>
<tr><td class='k'><input type="checkbox" name="disabilities" value="-1"></td><td>There are people in your group that have serious disabilities. </td></tr>
<tr><td class='k'><input type="checkbox" name="ramps" value="-1"></td><td>There are people in your group who need accessibility ramps. </td></tr><BR><BR>
<tr><th colspan='2'><b>Care</b></th></tr>
<tr><td class='k'><input type="checkbox" name="willingeldercare" value="-1"></td><td>There are people in your group that are willing to do eldercare. </td></tr>
<tr><td class='k'><input type="checkbox" name="availableeldercare" value="-1"></td><td>There are people in your group that are available to do eldercare. </td></tr>
<tr><td class='k'><input type="checkbox" name="needeldercare" value="-1"></td><td>There are elders in your group that need eldercare. </td></tr>
<tr><td class='k'><input type="checkbox" name="willingchildcare" value="-1"></td><td>There are people in your group that are willing to do childcare. </td></tr>
<tr><td class='k'><input type="checkbox" name="availablechildcare" value="-1"></td><td>There are people in your group that are available to do childcare. </td></tr>
<tr><td class='k'><input type="checkbox" name="needchildcare" value="-1"><BR></td><td>There are people in your group that need childcare. </td></tr>
<tr><th colspan='2'><b> </b></th></tr>
<tr><th colspan='2' class='c'><b>Preferences</b></th></tr>
<tr><td colspan='2'><center><b>Smoking/Drinking</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="Smoking_Drinking" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Smoking_Drinking" value="1"></td><td>Prefer nonsmokers</td></tr>
<tr><td class='k'><input type="checkbox" name="Smoking_Drinking" value="2"></td><td>Smoking not an issue</td></tr>
<tr><td class='k'><input type="checkbox" name="Smoking_Drinking" value="3"></td><td>Prefer nondrinkers</td></tr>
<tr><td class='k'><input type="checkbox" name="Smoking_Drinking" value="4"></td><td>Drinking not an issue</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>Preferred Housing Type</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="1"></td><td>Row houses</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="2"></td><td>Apartments</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="3"></td><td>Mobile homes</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="4"></td><td>Manufactured homes</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="5"></td><td>Condominium</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="6"></td><td>Co-op</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="7"></td><td>Hotel</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="8"></td><td>Motel</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="9"></td><td>Farm</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="10"></td><td>Rural</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="11"></td><td>City</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="12"></td><td>Suburbs</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="13"></td><td>Retirement community</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="14"></td><td>Gated community</td></tr>
<tr><td class='k'><input type="checkbox" name="Preferred_Housing_Type" value="15"></td><td>Pocket neighborhoods</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>Willing to relocate</b></center></td></tr>
<tr><td class='k'> </td><td align='left' style='color:blue'>*Selecting any of these will limit your results to the distance selected.</td></tr>
<tr><td class='k'><input type="checkbox" name="Willing_to_relocate" value="0" onchange="c()"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Willing_to_relocate" value="1" onchange="c()"></td><td>Only find groups willing to move anywhere</td></tr>
<tr><td class='k'><input type="checkbox" name="Willing_to_relocate" value="2" onchange="c()"></td><td>*Only find groups within 1000 miles of my group's zipcode</td></tr>
<tr><td class='k'><input type="checkbox" name="Willing_to_relocate" value="3" onchange="c()"></td><td>*Only find groups within 500 miles of my group's zipcode</td></tr>
<tr><td class='k'><input type="checkbox" name="Willing_to_relocate" value="4" onchange="c()"></td><td>*Only find groups within 200 miles of my group's zipcode</td></tr>
<tr><td class='k'><input type="checkbox" name="Willing_to_relocate" value="5" onchange="c()"></td><td>*Only find groups within 100 miles of my group's zipcode</td></tr>
<tr><td class='k'><input type="checkbox" name="Willing_to_relocate" value="6" onchange="c()"></td><td>*Only find groups within 50 miles of my group's zipcode</td></tr>
<tr><td class='k'><input type="checkbox" name="Willing_to_relocate" value="7" onchange="c()"></td><td>*Only find groups within 10 miles of my group's zipcode</td></tr>
<tr><td class='k'><input type="checkbox" name="Willing_to_relocate" value="8" onchange="c()"></td><td>*Only find groups within 2 miles of my group's zipcode</td></tr>
<tr><td class='k'><input type="checkbox" name="Willing_to_relocate" value="9" onchange="c()"></td><td>Only find groups unwilling to relocate</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>MC type sought</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="MC_type_sought" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="MC_type_sought" value="1"></td><td>With children</td></tr>
<tr><td class='k'><input type="checkbox" name="MC_type_sought" value="2"></td><td>Without children</td></tr>
<tr><td class='k'><input type="checkbox" name="MC_type_sought" value="3"></td><td>Children not an issue</td></tr>
<tr><td class='k'><input type="checkbox" name="MC_type_sought" value="4"></td><td>Singles MC</td></tr>
<tr><td class='k'><input type="checkbox" name="MC_type_sought" value="5"></td><td>Married MC</td></tr>
<tr><td class='k'><input type="checkbox" name="MC_type_sought" value="6"></td><td>Mixed MC</td></tr>
<tr><td class='k'><input type="checkbox" name="MC_type_sought" value="7"></td><td>Marital status not an issue</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>Open to be in mixed race MC</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="Open_to_be_in_mixed_race_MC" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Open_to_be_in_mixed_race_MC" value="1"></td><td>Prefer to be in MC of my own race</td></tr>
<tr><td class='k'><input type="checkbox" name="Open_to_be_in_mixed_race_MC" value="2"></td><td>Prefer to be in MC with racial diversity</td></tr>
<tr><td class='k'><input type="checkbox" name="Open_to_be_in_mixed_race_MC" value="3"></td><td>Race not an issue</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>Sexuality</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="Sexuality" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Sexuality" value="1"></td><td>Prefer not to answer</td></tr>
<tr><td class='k'><input type="checkbox" name="Sexuality" value="2"></td><td>Open to be in mixed sexual preference MC</td></tr>
<tr><td class='k'><input type="checkbox" name="Sexuality" value="3"></td><td>Prefer to be in MC of my own sexual preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Sexuality" value="4"></td><td>Prefer to be in MC with sexual preference diversity</td></tr>
<tr><td class='k'><input type="checkbox" name="Sexuality" value="5"></td><td>Sexual preference not an issue</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>Religious Openness</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="Religious_Openness" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Religious_Openness" value="1"></td><td>Open to be in mixed religion MC</td></tr>
<tr><td class='k'><input type="checkbox" name="Religious_Openness" value="2"></td><td>Prefer to be in MC of my own religion</td></tr>
<tr><td class='k'><input type="checkbox" name="Religious_Openness" value="3"></td><td>Prefer to be in MC with religious diversity</td></tr>
<tr><td class='k'><input type="checkbox" name="Religious_Openness" value="4"></td><td>Religion not an issue</td></tr>
<tr><td class='k'><input type="checkbox" name="Religious_Openness" value="5"></td><td>Prefer not to answer</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>Religion</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="1"></td><td>Agnostic</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="2"></td><td>Apostolic or New Apostolic</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="3"></td><td>Assemblies of God</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="4"></td><td>Atheist</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="5"></td><td>Baha'I</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="6"></td><td>Baptist</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="7"></td><td>Buddhist</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="8"></td><td>Catholic</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="9"></td><td>Christian Reform</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="10"></td><td>Christian Science</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="11"></td><td>Christian no denomination supplied</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="12"></td><td>Church of God</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="13"></td><td>Church of the Brethren</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="14"></td><td>Church of the Nazarene</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="15"></td><td>Churches of Christ</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="16"></td><td>Congregational or United Church of Christ</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="17"></td><td>Deity</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="18"></td><td>Disciples of Christ</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="19"></td><td>Druid</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="20"></td><td>Eckankar</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="21"></td><td>Episcopalian or Anglican</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="22"></td><td>Ethical Culture</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="23"></td><td>Evangelical or Born Again</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="24"></td><td>Foursquare Gospel</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="25"></td><td>Full Gospel</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="26"></td><td>Fundamentalist</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="27"></td><td>Hindu</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="28"></td><td>Holiness or Holy</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="29"></td><td>Humanist</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="30"></td><td>Independent Christian Church</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="31"></td><td>Jehovah's Witness</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="32"></td><td>Jewish</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="33"></td><td>Lutheran</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="34"></td><td>Mennonite</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="35"></td><td>Methodist or Wesleyan</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="36"></td><td>Mormon or Latter Day Saints</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="37"></td><td>Muslim</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="38"></td><td>Native American</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="39"></td><td>New Age</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="40"></td><td>No religion</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="41"></td><td>Nondenominational</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="42"></td><td>Orthodox Eastern</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="43"></td><td>Other unclassified</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="44"></td><td>Pagan</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="45"></td><td>Pentecostal or Charismatic</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="46"></td><td>Presbyterian</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="47"></td><td>Protestant no denomination supplied</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="48"></td><td>Quaker</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="49"></td><td>Rastafarian</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="50"></td><td>Reformed or Dutch Reform</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="51"></td><td>Salvation Army</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="52"></td><td>Santeria</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="53"></td><td>Scientologist</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="54"></td><td>Secular</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="55"></td><td>Seventh Day Adventist</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="56"></td><td>Sikh</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="57"></td><td>Spiritualist</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="58"></td><td>Taoist</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="59"></td><td>Unitarian or Universalist</td></tr>
<tr><td class='k'><input type="checkbox" name="Religion" value="60"></td><td>Wiccan</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>Childrearing Style and Preferences</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="Childrearing_Style_and_Preferences" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Childrearing_Style_and_Preferences" value="1"></td><td>Liberal or permissive</td></tr>
<tr><td class='k'><input type="checkbox" name="Childrearing_Style_and_Preferences" value="2"></td><td>Authoritative</td></tr>
<tr><td class='k'><input type="checkbox" name="Childrearing_Style_and_Preferences" value="3"></td><td>Authoritarian</td></tr>
<tr><td class='k'><input type="checkbox" name="Childrearing_Style_and_Preferences" value="4"></td><td>Liberal and authoritative mix</td></tr>
<tr><td class='k'><input type="checkbox" name="Childrearing_Style_and_Preferences" value="5"></td><td>Liberal and authoritarian mix</td></tr>
<tr><td class='k'><input type="checkbox" name="Childrearing_Style_and_Preferences" value="6"></td><td>Authoritative and authoritarian mix</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>Pets</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="Pets" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Pets" value="1"></td><td>Have dogs</td></tr>
<tr><td class='k'><input type="checkbox" name="Pets" value="2"></td><td>Have cats</td></tr>
<tr><td class='k'><input type="checkbox" name="Pets" value="3"></td><td>Have birds</td></tr>
<tr><td class='k'><input type="checkbox" name="Pets" value="4"></td><td>Have other pets</td></tr>
<tr><td class='k'><input type="checkbox" name="Pets" value="5"></td><td>Have barking dogs</td></tr>
<tr><td class='k'><input type="checkbox" name="Pets" value="6"></td><td>Have screeching birds</td></tr>
<tr><td class='k'><input type="checkbox" name="Pets" value="7"></td><td>Tolerant of neighbors' pet sounds</td></tr>
<tr><td class='k'><input type="checkbox" name="Pets" value="8"></td><td>Not tolerant of neighbors' pet sounds</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>Personal Entertainment</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="Personal_Entertainment" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Personal_Entertainment" value="1"></td><td>Tolerant of neighbors' loud music or TV</td></tr>
<tr><td class='k'><input type="checkbox" name="Personal_Entertainment" value="2"></td><td>Not tolerant of neighbors' loud music or TV</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>Housing—Interested in Common Shared Space for</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="Housing_Interested_in_Common_Shared_Space_for" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Housing_Interested_in_Common_Shared_Space_for" value="1"></td><td>Cooking</td></tr>
<tr><td class='k'><input type="checkbox" name="Housing_Interested_in_Common_Shared_Space_for" value="2"></td><td>Laundry</td></tr>
<tr><td class='k'><input type="checkbox" name="Housing_Interested_in_Common_Shared_Space_for" value="3"></td><td>Exercise</td></tr>
<tr><td class='k'><input type="checkbox" name="Housing_Interested_in_Common_Shared_Space_for" value="4"></td><td>Childcare</td></tr>
<tr><td class='k'><input type="checkbox" name="Housing_Interested_in_Common_Shared_Space_for" value="5"></td><td>Eldercare</td></tr>
<tr><td class='k'><input type="checkbox" name="Housing_Interested_in_Common_Shared_Space_for" value="6"></td><td>Home schooling</td></tr>
<tr><td class='k'><input type="checkbox" name="Housing_Interested_in_Common_Shared_Space_for" value="7"></td><td>Meetings</td></tr>
<tr><td class='k'><input type="checkbox" name="Housing_Interested_in_Common_Shared_Space_for" value="8"></td><td>Entertainment</td></tr>
<tr><td class='k'><input type="checkbox" name="Housing_Interested_in_Common_Shared_Space_for" value="9"></td><td>Not interested in common space</td></tr>
<BR><BR>
<tr><td colspan='2'>
<center><b>Employment</b></center></td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="0"></td><td>No preference</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="1"></td><td>Management, business, and financial</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="2"></td><td>Professional and related</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="3"></td><td>Office and administrative support</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="4"></td><td>Service</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="5"></td><td>Installation, maintenance, and repair</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="6"></td><td>Transportation and material moving</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="7"></td><td>Construction and extraction</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="8"></td><td>Production</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="9"></td><td>Sales and related</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="10"></td><td>Farming, fishing, and forestry</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="11"></td><td>Armed forces</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="12"></td><td>Part-time</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="13"></td><td>Temporary</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="14"></td><td>Retired</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="15"></td><td>Unemployed</td></tr>
<tr><td class='k'><input type="checkbox" name="Employment" value="16"></td><td>Independently wealthy</td></tr>
<tr><th colspan='2'><b> </b></th></tr>
<input name="entry" type="hidden" value="1">
<input name='fieldname' type='hidden' value=''>
<input name='fieldvalue' type='hidden' value=''>
<tr><td class='k'> </td><td><BR><input type="submit" value="Submit" class='submit'>
<input type="reset" value="Reset" class='submit'></td></tr></table>
</form><BR><BR>
</div>
<?php
mysql_close();
}
?>
</body>
</html>