AskToledo Signupmobile Adult

[insert_php]
$s_first="";
if (isset($_POST["first"])){$s_first=$_POST["first"];}
// Connecting, selecting database
$link = mysql_connect('localhost:3309', 'webuser', 'Op10n')
or die('Could not connect: ' . mysql_error());
mysql_select_db('op_panel') or die('Could not select database');

echo "";
$ch_num=1;
$loopcount=0;
$colcount=0;
$col=0;
//echo "section number ",$section, " end ";
$bl=" ";

$section="section1";
if ($section=="section1"){

//Build data from tables
$query = 'SELECT * FROM referrer order by referrer';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$numrow=mysql_num_rows($result);
$lp=0;
$option_block_ref="";

$query = 'SELECT * FROM ethnicity order by ethnicity';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$numrow=mysql_num_rows($result);
$lp=0;
$option_block_ethnicity="";

$query = 'SELECT * FROM month order by monthnum';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$numrow=mysql_num_rows($result);
$lp=0;
$option_block_month="";

$query = 'SELECT * FROM year order by year';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$numrow=mysql_num_rows($result);
$lp=0;
$option_block_year="";

$query = 'SELECT * FROM state order by statename';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$numrow=mysql_num_rows($result);
$lp=0;
$option_block_state="";

$query = 'SELECT * FROM prefix order by porder';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$numrow=mysql_num_rows($result);
$lp=0;
$option_block_prefix="";

$query = 'SELECT * FROM suffix order by sorder';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$numrow=mysql_num_rows($result);
$lp=0;
$option_block_suffix="";

$option_block_gender="";

$query = 'SELECT * FROM master where `desc`="ref"';
//echo $query;
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$row = mysql_fetch_array($result);
$refsav=$row['cvalue'];
if (trim($refsav)=="None"){
$refsav="Skip this";
}

//check adult-child

if (isset($_POST['adult'])){
$adult="Yes";
}
$adult="Yes";

// 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="";

$nad1="";
$nad2="";
$nci="";
$nst="" ;
$zni="";
$nct="";
$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 ($_GET['child']=="yes"){
$display.="child ";
}

if (!isset($_POST['credit'])){
$display.='Please select who referred you ' . $option_block_ref . "
";
}
$display .="

";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.

";
$display .="

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

";
$display_msg .= "";
$display_focus .= "";
$display_focus .= "";

}

if ($adult=="No000"){
$display .= "

Adult to contact for this child

Adult First Name * Adult Last Name * Adult Phone * Adult Email *

";
};
$display .="Please enter your information in the fields below.";
$display .= "

First Name
Last Name
Suffix " . $option_block_suffix . "
Gender " . $option_block_gender . "
Ethnicity " . $option_block_ethnicity . "

";
if ($s_first=="Yes"){
$display .= "

";
}
$display.="";
if ($adult == "Yes" ){
$display .="

Birth Date
Month " . $option_block_month . "
Day
Year " . $option_block_year . "
Address1
Address2
City
State " . $option_block_state . "
Zip Code
Primary Phone
Is Phone a mobile device? Yes      No
May we send you text messages?     Yes   
Email Address
Re-enter Email Address *

";
} else {
$display .= "

";
}
if ($_POST['credit']==$refsav){
$display .= "";

}else{
$display .= "";
}

$display .= "";
$display .= "";
$display .= "";
$display .= "";
$display .= "";
$display .= "";
$display .= "";
$display .= "";

$display .= "";
$display .= "";
$display .= "";
$display .= "";

//$display .= "

";
$display.="";
Echo "Fields in Red are required";
$display .= $display_msg;
echo $display;

echo $display_focus;

echo '

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

echo '

';
echo '

';
echo '

';
echo $display_focus;
}

[/insert_php]