AskToledo Signup Adult

[insert_php]
$s_first=””;
if (isset($_POST[“first”])){$s_first=$_POST[“first”];}else{$_POST[“first”]=”Yes”;$s_first=”Yes”;}
//if (!isset($_POST[‘credit’])){$_POST[‘credit’]=””;}
if (!isset($_POST[‘s_pfn’])){$_POST[‘s_pfn’]=””;}
if (!isset($_POST[‘s_pln’])){$_POST[‘s_pln’]=””;}
if (!isset($_POST[‘s_pph’])){$_POST[‘s_pph’]=””;}
if (!isset($_POST[‘s_pem’])){$_POST[‘s_pem’]=””;}
if (!isset($_POST[‘s_pad’])){$_POST[‘s_pad’]=””;}
if (!isset($_POST[‘s_pad2’])){$_POST[‘s_pad2’]=””;}
if (!isset($_POST[‘s_pci’])){$_POST[‘s_pci’]=””;}
if (!isset($_POST[‘s_pst’])){$_POST[‘s_pst’]=””;}
if (!isset($_POST[‘s_pzi’])){$_POST[‘s_pzi’]=””;}
if (!isset($_POST[‘verify’])){$_POST[‘verify’]=””;}
if (!isset($_POST[‘s_pct’])){$_POST[‘s_pct’]=””;}
if (!isset($_POST[‘s_pad1’])){$_POST[‘s_pad1’]=””;}
if (!isset($_POST[‘s_opt’])){$_POST[‘s_opt’]=””;}
if (!isset($_POST[‘s_pri’])){$_POST[‘s_pri’]=””;}

if (!empty($_POST[‘s_pfn’])){$_POST[‘s_pfn’]=str_replace(“\'”,”'”,$_POST[‘s_pfn’]); }
if (!empty($_POST[‘s_pln’])){$_POST[‘s_pln’]=str_replace(“\'”,”'”,$_POST[‘s_pln’]); }
if (!empty($_POST[‘s_pci’])){$_POST[‘s_pci’]=str_replace(“\'”,”'”,$_POST[‘s_pci’]); }
if (!empty($_POST[‘s_ad1’])){$_POST[‘s_ad1’]=str_replace(“\'”,”'”,$_POST[‘s_ad1’]); }
if (!empty($_POST[‘s_ad2’])){$_POST[‘s_ad2’]=str_replace(“\'”,”'”,$_POST[‘s_ad2’]); }
if (!empty($_POST[‘s_pad1’])){$_POST[‘s_pad1’]=str_replace(“\'”,”'”,$_POST[‘s_pad1’]); }
if (!empty($_POST[‘s_pad2’])){$_POST[‘s_pad2’]=str_replace(“\'”,”'”,$_POST[‘s_pad2’]); }
if (!empty($_POST[‘s_ci’])){$_POST[‘s_ci’]=str_replace(“\'”,”'”,$_POST[‘s_ci’]); }
if (!empty($_POST[‘afn’])){$_POST[‘afn’]=str_replace(“\'”,”'”,$_POST[‘afn’]); }
if (!empty($_POST[‘fncd’])){$_POST[‘fncd’]=str_replace(“\'”,”'”,$_POST[‘fncd’]); }
if (!empty($_POST[‘aln’])){$_POST[‘aln’]=str_replace(“\'”,”'”,$_POST[‘aln’]); }
if (!empty($_POST[‘ln’])){$_POST[‘ln’]=str_replace(“\'”,”'”,$_POST[‘ln’]); }
if (!empty($_POST[‘ad1’])){$_POST[‘ad1’]=str_replace(“\'”,”'”,$_POST[‘ad1’]); }
if (!empty($_POST[‘ad2’])){$_POST[‘ad2’]=str_replace(“\'”,”'”,$_POST[‘ad2’]); }
if (!empty($_POST[‘ci’])){$_POST[‘ci’]=str_replace(“\'”,”'”,$_POST[‘ci’]); }

// Connecting, selecting database
$link = mysqli_connect(‘localhost:3309’, ‘webuser’, ‘Op10n’)
or die(‘Could not connect: ‘ . mysqli_error($link));
mysqli_select_db($link,’op_panel’) or die(‘Could not select database’);
echo ““;
$ch_num=1;
$loopcount=0;
$colcount=0;
$col=0;
$bl=” “;
$section=”section1″;
if ($section==”section1″){
//Build data from tables
$query = ‘SELECT * FROM referrer order by referrer’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_ref=”“;
$query = ‘SELECT * FROM month order by monthnum’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_month=”“;

$query = ‘SELECT * FROM year order by year’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_year=”“;

$lp=$lp+1;
$pst=””;
if(isset($_POST[‘s_st’])){$pst=$_POST[‘s_st’];}
if (isset($_POST[‘child’])){
$pst=$_POST[‘s_pst’];
}
while ($row = mysqli_fetch_array($result)){
$id=$row[‘state’];
//$name=$row[‘referrer’];
$desc=$row[‘statename’];

if (isset($_POST[‘s_st’])){

if ($pst==$id){
$option_block_state .= ““;
}else {
$option_block_state .= ““;
}

} else {

if ($id==”OH”){
$option_block_state .= ““;
}else{
$option_block_state .= ““;
}
}
}
$option_block_state .= ““;

$query = ‘SELECT * FROM county order by county’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_county=”“;

$query = ‘SELECT * FROM education order by education’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_education=”“;

$query = ‘SELECT * FROM polparty order by party’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_party=”“;

$query = ‘SELECT * FROM marital order by marital’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_marital=”“;

$query = ‘SELECT * FROM income order by income’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_income=”“;

$query = ‘SELECT * FROM prefix order by porder’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_prefix=”“;

$query = ‘SELECT * FROM suffix order by sorder’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_suffix=”“;

$query = ‘SELECT * FROM ethnicity order by ethnicity’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_ethnicity=”“;

$query = ‘SELECT * FROM occupationstatus’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_occupationstatus=”“;

$query = ‘SELECT * FROM profession order by profession’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_profession=”“;

$query = ‘SELECT * FROM home’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_home=”“;

$query = ‘SELECT * FROM housevalue’;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$numrow=mysqli_num_rows($result);
$lp=0;
$option_block_housevalue=”“;

$option_block_gender=”“;

//$option_block_gender.=”“;
//$option_block_gender.=”“;
//$option_block_gender.=”“;

$query = ‘SELECT * FROM master where `desc`=”ref”‘;
//echo $query;
$result = mysqli_query($link,$query) or die(‘Query failed: ‘ . mysqli_error($link));
$row = mysqli_fetch_array($result);
$refsav=$row[‘cvalue’];

if (trim($refsav)==”None”){
$refsav=”Skip this”;
}

//check adult-child

$adult=”Yes”;

//print_r($_POST);

// Should have the data now, lets do the input
echo ‘‘;

$nad1=””;
$nad2=””;
$nci=””;
$nst=”” ;
$zni=””;
$nct=””;
$cname=””;
$nad1=””;
$nad2=””;
$nci=””;
$nst=””;
$nzi=””;
$nct=””;
$naln=””;
$nafn=””;
$naph=””;
$naem=””;
$cname=””;

if (isset($_POST[‘s_adult’])){
$nad1=$_POST[‘s_ad1’];
$nad2=$_POST[‘s_ad2’];
$nci=$_POST[‘s_ci’];
$nst=$_POST[‘s_st’];
$nzi=$_POST[‘s_zi’];
$nct=$_POST[‘s_ct’];
$cname=””;
}

$display = ‘

‘;
$display_msg=””;
$display_focus=” “;
if (empty($_POST[‘credit’])){
$display.=’Please select who referred you ‘ . $option_block_ref . “
“;

}

if (!empty($_POST[‘credit’])){

if ($_POST[‘credit’]==$refsav){
$display .= “

Please enter your friend/family member information in the fields below so they can receive proper credit for you joining our database.

Name of friend/family member Email of friend/family member Phone of friend/family member

“;
$display_msg .= ““;
$display_focus .= ““;

}
else{$display .= ““;}
}
$display.=”

“;

if ($adult==”No”){
$display .= “

Adult to contact for this child

Adult First Name Adult Last Name
Adult Phone Adult Email

“;
}
else{ $display .=”“;}

$display .=”Please enter your information in the fields below.“;
$display .= “

Prefix ” . $option_block_prefix . “ First Name MI Last Name Suffix ” . $option_block_suffix . “
Address 1
Address 2
City State ” . $option_block_state . “ Zip Code

County ” . $option_block_county . ” (Ohio & Michigan Only)
Primary Phone Secondary Phone
Is primary a mobile? Yes      No Is secondary a mobile? Yes      No
May we send you text messages?     Yes   
Gender ” . $option_block_gender . “ Ethnicity ” . $option_block_ethnicity . “
Birth Date (MM/DD/YYYY)

“;
if ($s_first==”Yes”){
$display .= “

“;
}

$display .= “

“;
if ($adult == “Yes” ){
$display .= “

Email Address Confirm Email
Occupation ” . $option_block_profession . “


;
} else {
$display .= ““;
}
$display.=’By clicking submit, you consent to receive emails requesting your participation in paid research studies and occasional updates from AskToledo. Your information is used only by our firm for research purposes and will not be shared with third parties. You have the option to unsubscribe at any time. Visit our Privacy Policy to learn more.‘;

//$display .= “

Do you use the internet on a mobile device? Yes No Unknown

“;
//echo “Please enter this contacts Information”;
$display .= ““;
$display .=”“;

Echo “Fields in RED are required”;
$display .= $display_msg;
echo $display;

if ($adult==”Yes”){
echo ““;
}else{
echo ““;
}
echo $display_focus;
echo ‘

‘;

echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo “
“;

if ($adult==”Yes”){
echo ““;
}else{
echo ““;
}
echo $display_focus;
}

if ($section==”section2″){

}

if ($section==”section3”){

}

[/insert_php]